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)