So I have a gui that when you click a button in it, it changes the players shirt/pants to the id I specified in the script. The problem is that it is a local script (since its in a gui) so only the player who clicked it can see it. How can I turn this into a server script?
-- Shirt -- script.Parent.MouseButton1Click:connect (function () playername = script.Parent.Parent.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=318964409" end end)
Hello,
In order to do this your gonna have to fire a remote event, so you can get through FilteringEnabled.
What is FilteringEnabled? Late 2019 (as far as I know) FilteringEnabled was enabled by default on every game, this is used to prevent exploiters to change stuff in the server, and if they do change something, it will change locally for them but not for anyone else.
If this helped please mark as solution!