Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i convert this server script work in a local script?

Hey i am trying to edit all my scripts to work with filtering enabled for more security, can someone help with changing this one, i've put it in a local script but idk why or how i should use a remoteevent/function and if you could give me some tips on converting scripts to work on filtering enabled that would be very helpful.

script.Parent.ClickDetector.MouseClick:connect(function(player)
player.PlayerGui.Shop.Frame.Visible = true
end)

2 comments

1

The good news is that a ClickDetector now works with FE.

1 answer

✓ Accepted answer

Here is what you could do:

player = game.Players.LocalPlayer

script.Parent.ClickDetector.MouseClick:connect(function
player.PlayerGui.Shop.Frame.Visible = true
end)

PLEASE NOTE that the game.Players.LocalPlayer variable is only available in LocalScripts!

This discussion is preserved as it was. New answers, comments, and votes are closed.