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

How Would I Make Filtering Enabled Work With GUIS?

Asked by
Aepeus 59
6 years ago
Edited 6 years ago

I've been messing around with scripts in guis with fe, but I cant get them to work? Is it because the playergui is local?

--script
wait(2.5)
script.Parent.Script.Event:Fire()

--local script
script.Event.Event:connect(function()
    print('yup!')
end)

These are both located in the playergui, and it seems to work in studio but not in the actual game.

0
This wiki article is pretty good at explaining it: http://wiki.roblox.com/index.php?title=Building_Games_with_Filtering_Enabled JamesLWalker 297 — 6y
2
:connect is deprecated Programical 653 — 6y

1 answer

Log in to vote
1
Answered by
XAXA 1569 Moderation Voter
6 years ago
Edited 6 years ago

You are using :Fire(), which means you're using a regular old BinadableEvent instead of a RemoteEvent. If that's the case, then use a RemoteEvent instead. BindableEvents are meant for communication between the scripts running on the server or the same client, whereas RemoteEvents are meant for client-server communication.

To fix your script, you have to replace Event with a RemoteEvent, and then call :FireClient(player) from the server instead, where player is the Player object (not the name!) of the player you want to send the event to. You can also do :FireAllClients() to send the event to all clients connected to the server.

Read the docs!

Ad

Answer this question