#Admin Panel Bug

1 messages · Page 1 of 1 (latest)

neon charm
#

Hello I am creating a admin panel with a speed command that is controlled by two textboxes. One textbox is for the player's name while the other is for the number that the speed of the player with be set to. Only the the player textbox works and I cannot figure out why the other one doesn't work, as it throws up a nil value, as if nothing was ever typed there even if something was typed. If anyone knows a way to fix the script down below so the second textbox does not do this, please reply with one as soon as possible.

    local player
    for i, v in pairs(game.Players:GetChildren()) do
        if string.lower(v.Name):sub(1, #plrtospeedup) == string.lower(plrtospeedup) or string.lower(v.DisplayName):sub(1, #plrtospeedup) == string.lower(plrtospeedup) then
            player = v
            break
        end
    end

    if player then
        if player.Character then
            player.Character.Humanoid.WalkSpeed = tonumber(script.Parent.Parent.Parent.Parent.nonplrargs.Text)
        end
    end
end)```
unborn turtle
#

Where is this script located

#

The formatting is terrible on mobile but I'm assuming you are trying to get the value straight out of the textbook for the speed

#

This won't work because you're using a server script. The text will only ever be filled on the client

#

The servers textbox will always be its original value unless you change it

#

You want to pass the speed as an argument as well

late micaBOT
#

studio** You are now Level 8! **studio

neon charm
neon charm
unborn turtle