Im trying to make a terminal but evertime I get close to it, it doesnt work and nothing happens. Please tell me if their is anything wrong with it.
timeuntilwin = 1200 totaltime = 1200 raidteamcolor = "Really blue" defendteamcolor = "Really red" h = Instance.new("Hint") function OnTouched(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == BrickColor.new(raidteamcolor) then script.Parent.BrickColor = BrickColor.new(raidteamcolor) end if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == BrickColor.new(defendteamcolor) then script.Parent.BrickColor = BrickColor.new(defendteamcolor) timeuntilwin = totaltime for i, v in pairs(game.Workspace:GetChildren()) do if v:IsA("Hint") then v:remove() end end end end end script.Parent.Touched:connect(OnTouched) while true do wait() if script.Parent.BrickColor == BrickColor.new(raidteamcolor) then h.Parent = game.Workspace h.Text = "Raiders win in".." "..timeuntilwin if timeuntilwin <= totaltime and timeuntilwin > 0 then wait(1) timeuntilwin = timeuntilwin - 1 end if timeuntilwin == 0 then h:remove() winmsg = Instance.new("Message") winmsg.Parent = game.Workspace winmsg.Text = "Raiders have won!" wait(5) winmsg:remove() script.Parent.BrickColor = BrickColor.new(defendteamcolor) timeuntilwin = totaltime end end end
I see an ERROR in the script. Its not OnTouched, its onTouched
. And I'm pretty sure you cant put a name inside a Color. You have to do like Color.new(1, 2 ,3); not a name.
@MUSHR0OM You're incorrect, don't try to help if you don't know for sure, it won't help the OP at all.
@neo Is there any output?