Door = script.Parent.Parent.Parent.Door
Button = script.Parent.Parent.Head
Button.ClickDetector.MouseClick:Connect(function(player)
if player:FindFirstChild("Owned") then
if player.Owned.Value == false then
game.ReplicatedStorage.RemoteEvent:FireServer(player)
Button.Parent.Parent.ClickHereToOwn.Name = (player.Name.."'s Store")
script.Parent.Parent.Parent.CurrentOwner.Value = player.Name
wait(1)
Door.Parent.Parent.Shop.Name = (player.Name.."Store")
wait(1)
Door.Transparency = 1
Door.CanCollide = false
wait(5)
script.Disabled = true
end
end
end)
I am trying to do when the character click a button then the model that he clicked will change the name with the group but It doesnt do anything in server, only in studio works. Can somebody help me?

4 comments
Is this a script or a local script? Also, where is it located?
it is a script ubicated in a part which the part has clickdetector.
You cannot FireServer from a Script, only a LocalScript. You should be using a BindableEvent instead of a RemoteEvent for communicating from script --> script.
oh ok