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

server side clothes gui script?

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)


1 answer

✓ Accepted answer

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!

1 comment

0

so aside from puting a remote event in the button and firing it, what do I need to do?

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