I'm really confused on how to make a script that will disable two of my Teleporters (Ingame teleport, to another area of the same game, not to another place), which are linked. I want to do it so I can make it disabled using a message. But it keeps coming up with errors. I also want to be able to make it enabled again.
This is what I've done so far:
admin = {"MasterPoke99"} game.Players.PlayerAdded:connect(function(p) for _,v in pairs(admin) do if p.Name:lower() == v:lower() then p.Chatted:connect(function(m) m = m:lower() tele = script.Parent enable = script.Parent.Teleport if m == "open sft" or "open secret" or "open teles" or "close arena" or "open vote" then wait(1) tele.Transparency = 1 tele.CanCollide = false script.Disabled = true elseif m == "Self-Training" then wait(1) tele.Transparency = 0 tele.CanCollide = true script.Disable = false end end) end end)
Could someone help me make a working one? Doesn't have to be similar to this. Thanks!
first of all, that's way too many ends second, is there a variable set up called "enable"?
admin = {"MasterPoke99"} game.Players.PlayerAdded:connect(function(p) for _,v in pairs(admin) do if p.Name:lower() == v:lower() then p.Chatted:connect(function(m) m = m:lower() tele = script.Parent enable = script.Parent.Teleport if m == "open sft" or "open secret" or "open teles" or "close arena" or "open vote" then wait(1) tele.Transparency = 1 tele.CanCollide = false enable.Disabled = true elseif m == "Self-Training" then wait(1) tele.Transparency = 0 tele.CanCollide = true enable.Disabled = false end end) end end)