It is a script inside a TextButton.
My problem is that, when I actually click the button, I get no error messages. However, no brickcolors change, no smoke activates, et cetera. Nothing happens.
Also, assume that "player" is the correct path to the player who enables the script.
local button = script.Parent
local player = button.Parent.Parent.Parent.Parent
ownervalue = player.PlayerGui.TermTimer.TOwner.Text
timevalue = player.PlayerGui.TermTimer.Time.Text
CapTime = game.Workspace.ICFTerminal.TermCapSystem.CapTime.Value
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
function OnClicked()
if player.TeamColor == ("Bright red") then
m = Instance.new("Message")
m.Text = "The Terminal is being captured by the Raiders!"
wait(5)
m:Destroy()
--First Step: Changing Colors--
a.BrickColor = player.TeamColor
hah.BrickColor = player.TeamColor
t1.BrickColor = player.TeamColor
t2.BrickColor = player.TeamColor
wait(.1)
--Next Step: Activating Smoke--
sm1.Enabled = true
sm2.Enabled = true
sm3.Enabled = true
sm4.Enabled = true
--Step Three: Enabling Timer--
CapTime = 0
ownervalue = "Raiders"
while true do
timevalue = CapTime.Value + 1
wait(1)
end
end
end
script.Parent.MouseButton1Down:connect(function()
end)

1 comment
You need to call the OnClicked function on line 58.