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

Text isnt changing in 2 player server. Help?

When I'm in studio testing it by myself it works. When I go into test mode with 2 players the text "has ordered" text stuff hasn't changed. Can someone make it so the text changes for everyone in the server with a rank higher than 180?

script.Parent.MouseButton1Down:connect(function()
local groupID = 3418893
local adminRankID = 180
script.Parent.Text = "Sent!"
wait(1)
script.Parent.Text = "Order"
if game.Players.LocalPlayer:GetRankInGroup(groupID) >= adminRankID then
for i,v in pairs(game.Players:GetPlayers()) do
v.PlayerGui.PopUpOrder.Frame.Order.Text = game.Players.LocalPlayer.Name.. " has ordered " ..script.Parent.Parent.Box1.Text.. ". " ..game.Players.LocalPlayer.Name.. "'s class is " ..script.Parent.Parent.Box2.Text.. "."
end
end
end)

6 comments

0

Can you put the code in a code block? It's a little hard to read like that...

0

How?

0

So edit your post, click that blue lua button, and copy paste all your code BETWEEN those 2 squiggly lines.

0

Done

0

Player1 can't change the playergui of Player2 and vise-versa. You'll need RemoteEvents for this.

0

Uh.. I'm not too god with RemoteEvents and stuff

1 answer

I think you should change some things on line 7 and move it into that for i,v in pairs thing.

Here's the script :

script.Parent.MouseButton1Down:connect(function()
local groupID = 3418893
local adminRankID = 180
script.Parent.Text = "Sent!"
wait(1)
script.Parent.Text = "Order"
for i,v in pairs(game.Players:GetPlayers()) do
if v:GetRankInGroup(groupID) >= adminRankID then
v.PlayerGui.PopUpOrder.Frame.Order.Text = game.Players.LocalPlayer.Name.. " has ordered " ..script.Parent.Parent.Box1.Text.. ". " ..game.Players.LocalPlayer.Name.. "'s class is " ..script.Parent.Parent.Box2.Text.. "."
end
end
end)

5 comments

0

doesnt work

0

Your script doesnt work

0

Oh. :I

0

It works in studio mode, but when I go in the real game it doesnt show.

0

What I mean by "it doesnt show" is that the text doesn't change

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