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

server side clothes gui script?

Asked by 3 years ago

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

Log in to vote
1
Answered by 3 years ago

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!

0
so aside from puting a remote event in the button and firing it, what do I need to do? Sabertooth11123 38 — 3y
Ad

Answer this question