Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Restricted Door Script not working and not changing the CanCollide activation. Help?

Asked by 8 years ago
Edited 8 years ago
01local allowed, door = {Player = true, DisruptedWings = true}, Instance.new("Part", workspace)
02door.Material = Enum.Material.Wood
03door.Anchored = true
04door.Size = Vector3.new(4, 7, 1)
05 
06door.Touched:connect(function(hit)
07    if game.Players:FindFirstChild(hit.Parent.Name) and allowed[hit.Parent.Name] then
08        door.CanCollide = false
09        door.Transparency = 0.5
10        wait(.5)
11        door.CanCollide = true
12        door.Transparency = 0
13    end
14end)
0
Please format your code correctly by highlighting it all, and then pressing the 'Lua' button in the top left corner of the frame. User#9949 0 — 8y
0
Oh ok, I knew something was wrong. Thanks! VisorDEV 0 — 8y

Answer this question