This might work, but if there’s an infinite yield on any of them, then change it to:
local playerGui = plr:WaitForChild("PlayerGui")
local money = playerGui:WaitForChild("Money")
local frame = money.Frame
local bankMoney = frame.Bankmoney
bankMoney.Enabled = true
Well I believe setting a TextBox’s enabled property is not possible- Try this:
local Players = game:GetService("Players") -- The players service!
local function ChangeUI(Player)
local success, catch = pcall(function() -- To catch errors, so the code will still run for anyone else who joins!
Player.PlayerGui.Money.Frame.Bankmoney.Visible = true -- Setting the visibility to true!
print("Success!") -- Debugging!
end
return success
end
Players.PlayerAdded:Connect(function(Player) -- PlayerAdded event!
local Success = ChangeUI(Player) -- Fire the function!
local Yay
if not Success then -- If it was unsuccessful, then retry until it is successful!
repeat wait() Yay = ChangeUI(Player) until Yay == true -- Repeat the process until it was successful!
print("Success!") -- Debugging!
end
end)
-- Finished!
-- Enjoy! :)
Also, simply making the ScreenGui’s “ResetOnSpawn” property false will make sure when the player resets, the UI will stay the same!