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
local allowed, door = {Player = true, DisruptedWings = true}, Instance.new("Part", workspace)
door.Material = Enum.Material.Wood
door.Anchored = true
door.Size = Vector3.new(4, 7, 1)

door.Touched:connect(function(hit)
    if game.Players:FindFirstChild(hit.Parent.Name) and allowed[hit.Parent.Name] then
        door.CanCollide = false
        door.Transparency = 0.5
        wait(.5)
        door.CanCollide = true
        door.Transparency = 0
    end
end)


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