I am making a door for filtering enabled,its working on Roblox Studio but its isn't working on Online.How to make this for RemoteEvent? Script:
function onClicked() Door = script.Parent.Parent.Door if Door.open.Value == true then Door.open.Value = false for i = 1, 10 do Door.CFrame = CFrame.new(Door.Position + Vector3.new(0, 0.1, 0)) wait(0.1) end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Line two must be local Door. And this must be in a serverscript.
function onClicked() local Door = script.Parent.Parent.Door if Door.open.Value == true then Door.open.Value = false for i = 1, 10 do Door.CFrame = CFrame.new(Door.Position + Vector3.new(0, 0.1, 0)) wait(0.1) end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)