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

Script Work's In Studio But Not In Game?

Asked by 9 years ago

I've tested this script in studio and it work's perfectly fine, but when I test it in-game it doesn't work, clicking it does nothing. Pressing F9 and viewing the output show's no error. Got any suggestion's on how I can fix it?

Msg1 = game.ServerStorage.Messages.Msg1
Msg2 = game.ServerStorage.Messages.Msg2
Msg3 = game.ServerStorage.Messages.Msg3
Msg4 = game.ServerStorage.Messages.Msg4
Text = script.Parent.TextL


gather = script.Parent.Status.FrameBorders:GetChildren()
OnDuty = false

script.Parent.Status.MouseButton1Down:connect(function(s)
if OnDuty == false then
    OnDuty = true

script.Parent.Status.Clicked:Play()
script.Parent.Status.Text = 'AVAILABLE'
script.Parent.Status.TextColor3 = Color3.new(0,1,0)

Msg1.Value = Msg2.Value
Msg2.Value = Msg3.Value
Msg3.Value = Msg4.Value
Msg4.Value = game.Players.LocalPlayer.Name.. ": random text here to"

Text.Visible = true

for i = 1,#gather do

if gather[i].Name == "Border" then
gather[i].BackgroundColor3 = Color3.new(0,1,0)
end
end

elseif OnDuty == true then
    OnDuty = false

script.Parent.Status.Clicked:Play()
script.Parent.Status.Text = 'BUSY'
script.Parent.Status.TextColor3 = Color3.new(1,0,0)


Msg1.Value = Msg2.Value
Msg2.Value = Msg3.Value
Msg3.Value = Msg4.Value
Msg4.Value = game.Players.LocalPlayer.Name.. ": random text here to"

Text.Visible = true

for i = 1,#gather do

if gather[i].Name == "Border" then
gather[i].BackgroundColor3 = Color3.new(1,0,0)
end
end
end
end)


Text.Close.MouseButton1Down:connect(function(c)
Text.Visible = false
end)

Answer this question