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

My text script isnt working and nothing is showing in Output. Can I get some help please?

Asked by 6 years ago
Edited 6 years ago

When I click the button nothing shows up in Output but it doesnt make the text "hi" (btw i just used "hi" for an example xd) Script:

script.Parent.MouseButton1Down:connect(function() local a = game.Workspace.PopUpOrder game.Workspace.PopUpOrder.Frame.Order.Text = "hi" wait(2) a.Parent = game.StarterGui script.Parent.Text = "Sent!" wait(3) script.Parent.Text = "Order" end)

Anybody know whats wrong?

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

You're using StarterGui to change it, that's why. StarterGui is meant to clone GUI to every player that joins or respawns, but it's not meant to constantly update the player's GUI.

Here's a fixed version of it :

script.Parent.MouseButton1Down:connect(function() 
    for i,v in pairs(game.Players:GetPlayers()) do
        v.PlayerGui.PopUpOrder.Frame.Order.Text = "hi"
    end
    script.Parent.Text = "Sent!" 
    wait(3) 
    script.Parent.Text = "Order" 
end)

0
So.. how do I fix it? gamerbeeze1 -3 — 6y
0
Do you want that PopUpOrder to show up for every player in the server? I'm a little confused with your code. User#20279 0 — 6y
0
Yes. gamerbeeze1 -3 — 6y
0
Wait. Is the PopUpOrder a GUI? If it is, I don't think Workspace is the right place to put it, unless it's on a part or something. User#20279 0 — 6y
View all comments (6 more)
0
Well.. you said it wont change if I keep it in startergui so what i did was I made it so it stays in workspace but after the text is changed it moves back to startergui but its invisible and visible is checked. gamerbeeze1 -3 — 6y
0
No no no. That's not what I mean. You have to PUT the GUI in StarterGui, but you don't CHANGE it in StarterGui. You'd have change the GUI in something called "PlayerGui". Here, I have the fixed script in my answer. User#20279 0 — 6y
0
Thanks! gamerbeeze1 -3 — 6y
0
May I ask, where did you learn to script so good? gamerbeeze1 -3 — 6y
0
The Roblox wiki and Youtube. I recommend you use Youtube for basic things and the wiki for more complex things. Youtube wasn't helpful to me when it comes to something complex. :I User#20279 0 — 6y
0
Thanks! gamerbeeze1 -3 — 6y
Ad

Answer this question