Let me explain that better. Basically, I have a part, and when the player touches it, it will fire a remote event that runs some client-side code.
The server script (below) works fine when the object is a child of the workspace from the start. However, if I try to change the parent of the crate via scripting (i.e move the crate from ReplicatedStorage to Workspace) the script suddenly does nothing. Can anyone help?
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = workspace[hit.Parent.Name] local player = game.Players:GetPlayerFromCharacter(plr) game.ReplicatedStorage.CoinChestEvent:FireClient(player) script.Parent.Parent:Destroy() end end)