As of now, I have created the following script:
local gpath = game.StarterGui.ScreenGui.BackFrame.MidFrame local ipath = game.Workspace.Tycoon.Tycoon.InvInt local update1 = game.Workspace.Tycoon.Tycoon.InvInt.Stone local update2 = game.Workspace.Tycoon.Tycoon.InvInt.StoneB local character = game.workspace.Tycoon.Tycoon.OwnerString.Value -- Temporary placeholder local LGui = game.Players.character.PlayerGui.ScreenGui.BackFrame.MidFrame -- Works when character is labeled as ROBOFROG function TUpdate() print('fire') LGui.StoneFrame.Ore.Text = (tostring(ipath.Stone.Value)) gpath.StoneFrame.Bar.Text = (tostring(ipath.StoneB.Value)) end update1.Changed:connect(TUpdate) update2.Changed:connect(TUpdate)
Basically, this is a script (that does currently work) which works like a local script with local references, however is not a local script. As of now though, it doesn't differentiate between people. It is only working currently if I manually load my name into the script where it says "character" inside the LGui variable.
How would I be able to make this script automatically insert the name of the user into the "character" local variable? I'm guessing it'll have something to do with children, but I haven't been able to get that to work yet.
The total purpose of the script shouldn't matter, but in case it is truly needed, I can type it all out. But, as of now, I think all that needs to be changed is accessible in this one script.
Any help is much appreciated, and thank you for reading!
Explained in comments.
function playerAdded(player) repeat wait() until player.Character local character = player.Name --Simply makes the Character variable the player's name. From there, you can change Gui text, Humanoid names, or anything you need with the Character variable. end game.Players.PlayerAdded:connect(playerAdded)
Hmm, since I do not know what this script does
I know you can do this, but this is all I know of, sorry if this was no help :(
game.Players.LocalPlayer