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

Text isnt changing in 2 player server. Help?

Asked by 6 years ago
Edited 6 years ago

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)
0
Can you put the code in a code block? It's a little hard to read like that... User#20279 0 — 6y
0
How? gamerbeeze1 -3 — 6y
0
So edit your post, click that blue lua button, and copy paste all your code BETWEEN those 2 squiggly lines. User#20279 0 — 6y
0
Done gamerbeeze1 -3 — 6y
View all comments (2 more)
0
Player1 can't change the playergui of Player2 and vise-versa. You'll need RemoteEvents for this. RubenKan 3615 — 6y
0
Uh.. I'm not too god with RemoteEvents and stuff gamerbeeze1 -3 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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)

0
doesnt work gamerbeeze1 -3 — 6y
0
Your script doesnt work gamerbeeze1 -3 — 6y
0
Oh. :I User#20279 0 — 6y
0
It works in studio mode, but when I go in the real game it doesnt show. gamerbeeze1 -3 — 6y
0
What I mean by "it doesnt show" is that the text doesn't change gamerbeeze1 -3 — 6y
Ad

Answer this question