RemoteEvent doesn't work

Hello,
I am making a testing game where I test scripts and stuff, and want to destroy a door locally.

But the RemoteEvent doesn’t fire somehow.

Here’s the Code in ServerScriptService:

game.Players.PlayerAdded:Connect(function(player)
	game.ReplicatedStorage.DestroyDoor:FireClient(player)
end)

And the LocalScript in the Door:

local function unlock()
	script.Parent:Destroy()
end

game.ReplicatedStorage.DestroyDoor.OnClientEvent:Connect(unlock)

What did I do wrong?

LocalScripts dont work when they are not inside a player, you should put the local script in PlayerScripts or CharatcerScripts since they clone the scripts and put them in the player/character

2 Likes

Alrighty, let me try that really quick.

That has worked - Thank you very much! :smiley: