Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help me with my Terminal please?

Asked by
neoG457 315 Moderation Voter
10 years ago

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

2 answers

Log in to vote
-1
Answered by 10 years ago

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.

0
OnTouched is a function called by a event, if it had different capitalization then you may point it out but it's correct. And the color is the BrickColor name, the OP does not want the Color3 Value. M39a9am3R 3210 — 10y
Ad
Log in to vote
-1
Answered by
Ekkoh 635 Moderation Voter
10 years ago

@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?

0
You can use the 'Post a command..." field to reply. Trioxide 79 — 10y
0
No he can't Trioxide, it's a 5 rep point permission... M39a9am3R 3210 — 10y

Answer this question