Hi Im trying to create a filtering enabled door which turns for red to green, destroys its decal and its cancollide to false. The LocalScript works but the Script doesnt. It doesnt show any errors and it doesnt even show its printed word.
LocalScript (Placed in TextLabel under ScreenGUI under StarterGUI):
db = false
local hum = game.Workspace["Human Spawn"]
local text = script.Parent
function OnTouch(hum)
if db == false then
db = true
text.Text = 35
wait(1)
text.Text = 34
wait(1)
text.Text = 33
wait(1)
text.Text = 32
wait(1)
text.Text = 31
wait(1)
text.Text = "Door will open in 30 seconds"
wait(1)
text.Text = 29
wait(1)
text.Text = 28
wait(1)
text.Text = 27
wait(1)
text.Text = 26
wait(1)
text.Text = 25
wait(1)
text.Text = 24
wait(1)
text.Text = 23
wait(1)
text.Text = 22
wait(1)
text.Text = 21
wait(1)
text.Text = 20
wait(1)
text.Text = 19
wait(1)
text.Text = 18
wait(1)
text.Text = 17
wait(1)
text.Text = 16
wait(1)
text.Text = 15
wait(1)
text.Text = 14
wait(1)
text.Text = 13
wait(1)
text.Text = 12
wait(1)
text.Text = 11
wait(1)
text.Text = "Door will open in 10 seconds"
wait(1)
text.Text = 9
wait(1)
text.Text = 8
wait(1)
text.Text = 7
wait(1)
text.Text = 6
wait(1)
text.Text = "Door will open in 5 seconds"
wait(1)
text.Text = "Door will open in 4 seconds"
wait(1)
text.Text = "Door will open in 3 seconds"
wait(1)
text.Text = "Door will open in 2 seconds"
wait(1)
text.Text = "Door will open in 1 seconds"
wait(1)
text.Text = "Door will open in 0 seconds"
wait(1)
text.Text = "Team, FALL BACK!"
-- game.Workspace.TS1.Door1.CanCollide = false
-- game.Workspace.TS1.Door1.BrickColor = BrickColor.new("Sea green")
-- local laser = game.Workspace.TS1.Door1.LaserPlane
-- laser:Destroy()
text.Door:FireServer()
wait(5)
text.Text = ""
db = true
end
end
hum.Touched:Connect(OnTouch)
Script (Placed in a folder in ServerScriptService, Human Spawn in Workspace and TextLabel):
game.StarterGui.Timesplitters.TS1Door1.TextLabel.Door.OnServerEvent:Connect(function()
print("DOOR OPEN DOOR")
game.Workspace.TS1.Door1.CanCollide = false
game.Workspace.TS1.Door1.BrickColor = BrickColor.new("Sea green")
local laser = game.Workspace.TS1.Door1.LaserPlane
laser:Destroy()
end)
So any ideas to fix this? Thanks in advance!

1 comment
Also, my suspicions are that Human Spawn isn’t a BasePart, and is a Model. The Touched event doesn’t invoke on said objects, so you should ensure that it’s a part the player is colliding with. Speaking on the terms of a player colliding with an instance, it should also be clarified that the instance was touched by a player, as it can be fired by other inanimate objects.