So, everytime I make a game, it works on studio and NOT in the servers, is there a fix for this? In this one when I clicked the clickdetector, it didn't do anything nor gave me an error.
script.Parent.MouseClick:Connect(function()
script.Parent.Parent.Parent.ClosedChest.Parent = game.ReplicatedStorage -- Hiding the closed chest
local chest = game.ReplicatedStorage.Chest:Clone() -- Cloning the opened chest
chest.Parent = workspace
chest:SetPrimaryPartCFrame(CFrame.new(script.Parent.Parent.Parent.chestloc.Position)) --Teleporting the open chest to the location of a brick called "chest location" to make it look like it opened up
script.Parent:Destroy() -- Deleting the clickdetector
end)

4 comments
Is that in a ServerScript or LocalScript?
@herrtt serverscript.
are you using filtering enabled?
Nope, It's off.