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

I have no idea why this is wrong??

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Everything works perfectly in play solo but not in play mode.. I need help

players = 2
status = script.Status
while true do
    wait()
    if game.Players.NumPlayers >= players  then
    status.Value ="Testing for a game"
    wait(3)
    status.Value = "Why wouldnt you work"
    for i = 5,1,-1 do
        status.Value = "u better work"..i
        wait(1)
    end
    status.Value = "now repeat"
    else
        status.Value = "This works just the other script is messed up.."
    end


end

NOW THE GUI SCRIPT..

status = game.Workspace.Script.Status

status.Changed:connect(function(work)
    script.Parent.Text = status.Value
end)
0
its probably cause its not updating playergui NinjoOnline 1146 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago
players = 2
status = script.Status

while wait() do 
    if game.Players.NumPlayers >= players  then
        status.Value ="Testing for a game"
        wait(3)
        status.Value = "Why wouldnt you work"
    for i = 5,1,-1 do
            status.Value = "u better work"..i
            wait(1)
    end
        status.Value = "now repeat"
    else
        status.Value = "This works just the other script is messed up.."
    end
end

The GUI script is the same. BUT change it to LocalScript so it can access the player

local player = game.Players.LocalPlayer
status = game.Workspace.Script.Status

status.Changed:connect(function(change)
    player.PlayerGui.StatusGui.TextLabel.Text = status.Value -- Change StatusGui.TextLabel to where it is placed.
end)

If this dosen't work, don't hate, just tell me and I'll double check and test myself in game and give a defianite working one. The reason why it wasn't working was cause it was, but since in play mode it dosent access it from the player.

0
It still dosnt work :/, ive been working on trying to find someway to make it work, can you double check for me?? PullAnAllNighter 8 — 10y
0
yeah ok NinjoOnline 1146 — 10y
Ad

Answer this question