It must be visible by default. If you didn’t touch it, that not problem. I have an idea why it didn’t work. Add some wait() before of change text. (Edited: I don’t think .CharacterAdded:Wait() actually help.)
Try placing a local script into StarterCharacterScripts then do something like this
local player = game:GetService(“Players”).LocalPlayer
game:GetService(‘Players’).LocalPlayer:WaitForChild(‘PlayerGui’).YOURPATHTOTHETEXT = "Welcome to the Shop " .. player.Name
Change the start of your script to this, and be sure its a local script in startercharacterscripts
local player = game:GetService(“Players”).LocalPlayer
local PG = game:GetService(‘Players’).LocalPlayer:WaitForChild(‘PlayerGui’)
local Character = player.Character or player.CharacterAdded:Wait()
local ShopBlur = game.Lighting:WaitForChild(“ShopBlur”)
local ShopFrame = PG.PATHTOSHOPFRAME:WaitForChild(“ShopFrame”)
local SEB = ShopFrame:WaitForChild(“ShopExitButton”)
local ShopButton = PG.PATHTODISPLAYBUTTONS:WaitForChild(“ShopButton”)
local PlayerNameDisplay = ShopFrame:WaitForChild(“PlayerNameDisplay”)
local canToggle = true
PG.SettingsUI.ShopFrame.PlayerNameDisplay.Text = "Welcome to the Shop " .. player.Name
Let me know if i left in any mistakes or if it’s not working
Hey so I think this might fix your issue, but what I would do is have like a client local script and have there all the gui handling not creating a script for shop, one for something else. But as advice I would just manage and clean my code since your code is messy and not really that readable. Here is your code a bit more cleaned up and I hope this helped you!
-- also sorry if I messed up some variables or some code --
local canToggle = true
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local ShopBlur = game.Lighting:WaitForChild("ShopBlur")
local Player = Players.LocalPlayer
local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local Character = Player.Character or Player.CharacterAdded:Wait()
local ShopFrame = PlayerGui.SettingsUI:WaitForChild("ShopFrame")
local ShopExitButton = ShopFrame:WaitForChild("ShopExitButton")
local ShopButton = PlayerGui.SettingsUI.DisplayShop.DisplayButtons:WaitForChild("ShopButton")
local PlayerNameDisplay = ShopFrame:WaitForChild("PlayerNameDisplay")
-- [[ INIT ]] --
PlayerGui.SettingsUI.ShopFrame.PlayerNameDisplay.Text = "Welcome to the Shop " .. player.Name
-- [[ UTILITIES ]] --
function SetJumpWalkAttributes(Arg1, Arg2, Arg3)
local Humanoid = Arg1
Humanoid.WalkSpeed = Arg2
Humanoid.JumpPower = Arg3
--return true
end
-- [[ CONNECTIONS ]] --
ShopButton.MouseButton1Click:Connect(function()
if ShopFrame.Visible == false and canToggle then
canToggle = false
ShopFrame.Visible = true
ShopBlur.Enabled = true
ShopFrame:TweenPosition(
UDim2.new(0.131, 0,0.091, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
.9,
false
)
SetJumpWalkAttributes(Player.Character:WaitForChild("Humanoid"), 0, 0)
delay(1, function()
canToggle = true
end)
elseif canToggle then
canToggle = false
ShopExitButton.MouseButton1Click:Connect(function()
ShopFrame:TweenPosition(
UDim2.new(0.131, 0,-0.895, 0),
Enum.EasingDirection.In,
Enum.EasingStyle.Quart,
.9,
false
)
delay(1, function()
SetJumpWalkAttributes(Player.Character:WaitForChild("Humanoid"), 16, 50)
ShopBlur.Enabled = false
ShopFrame.Visible = false
canToggle = true
end)
end)
end
end)