I made the variable to search for the door then im stuck on how to make the transparency set to .5 then the CanCollide false. So basically this?
Local Door = script.Parent ????????? ????
Assuming you already have the ClickDetector object inside of the door:
Hello!
So basically, you need to use this:
-- IN A SERVER SCRIPT, INSIDE OF THE DOOR -- local door = script.Parent -- door variable local cD = script.Parent.ClickDetector -- click detector local event = game.ReplicatedStorage.Clicked -- This will be used to make the door LOCAL, so that people cannot get through with their friends. cD.MouseClick:Connect(function(player) -- gets the player after a click event:FireClient(player, door) -- fires onto client end) -- IN A LOCALSCRIPT, IN STARTERPLAYERSCRIPTS -- local event = game.ReplicatedStorage:WaitForChild("Clicked") -- gets the event event.OnClientEvent:Connect(function(door) -- when the event is fired door.CanCollide = false -- canCollide false door.Transparency = 0.5 -- transparency 0.5 wait(1) -- change to whatever you'd like door.Transparency = 0 -- transparency = 0 door.CanCollide = true -- canCollide true end)
Hope this works!