So I am having this error called

Error:

 17:22:19.375 - OnServerEvent is not a valid member of RemoteEvent

And the script is a ServerScript

Code:

Remote.OnServerEvent:Connect(function(player)
	local Character = player.Character
	local RootPart = Character:WaitForChild("HumanoidRootPart")
	local folder = workspace:FindFirstChild('DebrisFolder') or Instance.new("Folder",workspace)
	folder.Name = "DebrisFolder"

1 comment

0

This code should work fine, can you show the full code?