These are separate scripts with different functions. They do nothing, even though I made sure all the hierarchies and parents are correct. They leave no error messages.
Any ideas?
Remember, these are all in a GUI TextButton.
Script 1: Create a new message in Workspace and destroy it after 5 seconds.
local player = script.Parent.Parent.Parent.Parent.Parent
function OnClicked()
if player.TeamColor == ("Bright red") then
local m = Instance.new("Message", workspace) -- Parent the Message!
m.Text = "The Terminal is being captured by the Raiders!"
wait(5)
m:Destroy()
end
end
script.Parent.MouseButton1Down:connect(OnClicked)
Script 2: Use the player's TeamColor as a template to change the BrickColor of multiple bricks, then activate smoke.
a = game.Workspace.ICFTerminal.TermCapSystem.Activator
hah = game.Workspace.ICFTerminal.TermCapSystem.Hah
t1 = game.Workspace.ICFTerminal.TermCapSystem.TeamPart1
t2 = game.Workspace.ICFTerminal.TermCapSystem.TeamPart2
am = game.Workspace.ICFTerminal.TermCapSystem.Activator.Mesh
sm1 = game.Workspace.ICFTerminal.SmokeParts.smoke1.Smoke
sm2 = game.Workspace.ICFTerminal.SmokeParts.smoke2.Smoke
sm3 = game.Workspace.ICFTerminal.SmokeParts.smoke3.Smoke
sm4 = game.Workspace.ICFTerminal.SmokeParts.smoke4.Smoke
local player = script.Parent.Parent.Parent.Parent.Parent
function OnClicked()
if player.TeamColor == ("Bright red") then
a.BrickColor = player.TeamColor
hah.BrickColor = player.TeamColor
t1.BrickColor = player.TeamColor
t2.BrickColor = player.TeamColor
wait(.1)
sm1.Enabled = true
sm2.Enabled = true
sm3.Enabled = true
sm4.Enabled = true
end
end
script.Parent.MouseButton1Down:connect(OnClicked)
Script 3: Activate the Terminal. Set the timer to 0, and set the owner to Raiders. Then, every 1 second, add one second to the timer.
local player = script.Parent.Parent.Parent.Parent.Parent
ownervalue = player.PlayerGui.TermTimer.TOwner.Text
timevalue = player.PlayerGui.TermTimer.Time.Text
CapTime = game.Workspace.ICFTerminal.TermCapSystem.CapTime
function OnClicked()
if player.TeamColor == ("Bright red") then
CapTime.Value = 0
ownervalue = "Raiders"
wait(1)
while wait(1) do
timevalue = CapTime.Value + 1
end
end
script.Parent.MouseButton1Down:connect(OnClicked)
end

2 comments
Oh my god, it works!
can you accept this answer please