of     1   

RedcommanderV2
#228323990Saturday, December 02, 2017 12:22 PM GMT

I want to make a script that when a player touches it (the player's name is in variable _G.PlayerStorage and it's only 1 player max) the parent ( a wall ) collision gets removed. should be easy but I don't know what is wrong with my script: function onTouch(hit) if hit.Parent == _G.PlayerStorage then script.Parent.CanCollide = false wait(1) script.Parent.CanCollide = true end end script.Parent.Touched:connect(onTouch)
RedcommanderV2
#228324307Saturday, December 02, 2017 12:42 PM GMT

already dead forum r.i.p.
Divitiae
#228327354Saturday, December 02, 2017 2:47 PM GMT

Make sure the script is inside the part, if else then idk
chexyalani
#228327463Saturday, December 02, 2017 2:50 PM GMT

function onTouch(hit) if hit.Parent.Name==_G.PlayerStorage then script.Parent.CanCollide=true wait(1) script.Parent.CanCollide=false end end script.Parent.Touched:Connect(function(hit) onTouch(hit) end)
Camper0008
#228327471Saturday, December 02, 2017 2:51 PM GMT

attempting to compare a object with a string function onTouch(hit) if hit.Parent.Name == _G.PlayerStorage then script.Parent.CanCollide = false wait(1) script.Parent.CanCollide = true end end ╴ “I seem to get mentioned alot in videogames.. i wonder why..”
RedcommanderV2
#228328710Saturday, December 02, 2017 3:29 PM GMT

Doesn't work r.i.p.
igrach2
#228328979Saturday, December 02, 2017 3:37 PM GMT

local door,open=script.Parent,false repeat wait(2)until _G.PlayerStorage door.Touched:Connect(function(hit) local char=hit.Parent if char and open==false and char.Name==_G.PlayerStorage then open=true door.CanCollide=false wait(1) door.CanCollide=true wait(.5) open=false end end)
RedcommanderV2
#228329171Saturday, December 02, 2017 3:43 PM GMT

doesn't work either :/
cvbza
#228330058Saturday, December 02, 2017 4:07 PM GMT

function onTouch(hit) if hit.Parent “== _G.PlayerStorage” then script.Parent.CanCollide = false wait(1) script.Parent.CanCollide = true end end end)
cvbza
#228330097Saturday, December 02, 2017 4:08 PM GMT

oops sorry function onTouch(hit) if hit.Parent == “_G.PlayerStorage” then script.Parent.CanCollide = false wait(1) script.Parent.CanCollide = true end end)
RedcommanderV2
#228331432Saturday, December 02, 2017 4:47 PM GMT

doesn't work either

    of     1