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

I'm learning about FilteringEnabled and I've run across a few problems?

Asked by 6 years ago

Now I'm sure that this might have been answered before but this is my first day learning FE, so try to make it simple :P

So I watched Alvinblox's tutorial on Remote Events, I copied it exactly how he did it and it worked. I then decided to try it with a Surface Gui - I did everything the same as I should do; but I got no results.

Apparantly RemoteEvents only work on ScreenGuis??? (Obviously not)

LocalScript:

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.RemoteEvent:FireServer()
end)

Script:

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
    print("oof")
end)
0
I've read it all - trust me. CaptaiinNoob 52 — 6y
0
The way you're doing it should work fine. Can I see the exact script thats causing you problems? It might help a bit shakran 23 — 6y
0
Since right now all the code you posted did is print out "oof" in the server output. :P shakran 23 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

This depends on if you are handling the SurfaceGui locally or not. For example, if you put a SurfaceGui directly onto a part and then tried to use a LocalScript with remote firing, it would probably not work as the SurfaceGui would be handled on the server rather than the client.

So, if you want to handle a SurfaceGui locally, you would simply place the SurfaceGui into StarterGui and make a script that sets the Adornee property of the GUI to the part that you want it displayed on. This way, the SurfaceGui is in the client and is being watched by the client. Then, your code should work.

That may sound confusing, so here's some other wiki articles that could help get you going. If you have any other questions, feel free to contact me on Discord joritochip#4657.

http://wiki.roblox.com/index.php?title=Experimental_Mode

http://wiki.roblox.com/index.php?title=API:Class/SurfaceGui

http://wiki.roblox.com/index.php?title=The_Fundamentals_of_Scripting_with_GUIs

If I helped you out, please leave an upvote! If I solved your solution, please mark my reply as the post's solution. This allows future visitors to see the correct solution. Thanks!

Ad

Answer this question