Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I have no idea why this is wrong??

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)

1 comment

0

its probably cause its not updating playergui

1 answer

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.

2 comments

0

It still dosnt work :/, ive been working on trying to find someway to make it work, can you double check for me??

0

yeah ok

This discussion is preserved as it was. New answers, comments, and votes are closed.