Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

how would i fire a event to travel from one client to the server and then all other clients?

Asked by 4 years ago

hello,

i dont have a script for this because i need help making one or have some questions on how to do something. this isnt a request just need some help.

so im trying to make a script where when a player presses a key it makes him invisible or visible on their own screen(which i already did). then i want the script to fire a event to travel to the server and then all other clients. a script that would receive the event inside each player would then compare its clients leaderstat with the client who pressed the key's leaderstat if the client has more or less stats then the client who pressed the key it would then make the client who pressed the key invisible or visible on the other clients screens.

i just need help figuring out how i can make each client receive the event fired and then get the clients character who fired the event and then i would know how to make then visible or invisible.

anyway i hope i was clear with what i needed help with and somone can help me? and thank you!

1 answer

Log in to vote
3
Answered by 4 years ago

like this:

from client: someRemoteEvent1:FireServer();

someRemoteEvent1.OnClientEvent:Connect(function(player)
    someRemoteEvent2:FireAllClients()
end)


0
oh dont forget the recieving part maybe you should right that too speedyfox66 237 — 4y
Ad

Answer this question