#event not working or firing as intended to

7 messages · Page 1 of 1 (latest)

ancient tundra
#

i dont think you can userinputservice on a serversided script

#

you should try sending the key that the user is pressing with the event

#

you should fire the event when the user starts pressing G and stops pressing it with the userinputservice on the client

young olive
#

studio** You are now Level 1! **studio

ancient tundra
#

when the user starts pressing G you can send a second argument and call it "Pressing_G"

#

putting them in a single event could be better

#

shieldEvent:FireServer("ShieldON")

-- serverscript
shieldEvent.OnServerEvent:Connect(function(plr,thing)
if thing == "ShieldON" then
-- shield on script
elseif thing == "ShieldOFF" then
-- shieldoff script
end)