Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i make my script update the text in my text button?

I dont get an error or anything so idk what isnt working

script.Parent.TextBox.Text = script.Parent.Parent.Parent.Character.Humanoid.WalkSpeed

1 comment

0

both the script and textbox is a parent of screengui

1 answer

✓ Accepted answer

Ur not locating the Player you're locating nothing as ur telling ur script to find Character in ScreenGui which isn't valid instead do

game:GetService('Players').LocalPlayer.Character.Humanoid.Walkspeed

Also this will not work at all (Meaning this script will not work at all if this is a server sided script) Also edit for the entire line

script.Parent.TextBox.Text = game:GetService('Players').LocalPlayer.Character.Humanoid.Walkspeed

4 comments

0

Edit - This will not work at all if not in a Local Script

0

I cant turn off experimental mode or i can atleast not find where it is, ive searched in game settings and in roblox game settings

0

and i am telling my script to locate the character because i find the player since the screengui is a child of the player once you play so it does work

0

No Screengui isn't a Child of Player, PlayerGui is a child of Player

This discussion is preserved as it was. New answers, comments, and votes are closed.