#remote event affects all the players in the server instead of one

20 messages · Page 1 of 1 (latest)

misty dew
#

make your script to client-sided

#

its not good to handle everything on the server

gritty solstice
#

mainly gui's

#

everything else is fine

#

eh idk

#

ur script is weird

#

tbh

#

if it works

#

then keep it

#

the touch script should be on server

vestal wren
#

KeyDown has been deprecated for nearly 9 years now

misty dew
#

nooo

#

not that way

#

oh my god

urban delta
#

Using script.Enabled is a bad practice - it may cause unexpected behavior. You can use it for debug reasons while testing your game in studio or disable scripts that you don't need to run at all. (At least ive never seen anyone use it in finished games)

misty dew
urban delta
#

You can set up a Value inside player or an attribute that will indicate if power up is active and handle it on client.

Assuming PowerupAcive is your value you can do something like this on client:
PwerupActive.Changed:Connect(function(Active)
if Active then
-- walkspeed = 999
else
-- walkspeed = 16
end
end)

So if server sets PoverupActive value of some player to true, local script will change that players speed to 999

misty dew
#

nah

#

make your script client-sided

misty dew
#

nice