-- Here's my script, "I'm using a "LocalScript".
-----------
local part = script.Parent
local cd = part.ClickDetector
cd.MouseClick:Connect(function(playerwhoclicked)
playerwhoclicked.Character.Humanoid.WalkSpeed = 100
end)
COMMUNITY QUESTION
How do i gain access to "Humanoid" when clicking a button?
1 answer
LocalScripts don't run in the Workspace, making it a Script should work without any errors.
Hope this helped
This discussion is preserved as it was. New answers, comments, and votes are closed.

9 comments
Please use codeblock.
Why would you change the walkspeed via a local script?
I've tried it on a normal script, but doesn't seem to work as well, i have no clue what "codeblock" is as well. I'm sorry, i'm just new to lua coding. And i'm trying to learn it at a fast pace with the right people.
well first of all, you don't have to get the player who clicked, since you are accessing it with a local script
you just have to get the local player by writing: Player = game.Players.LocalPlayer and then do Player.Character.Humanoid.WalkSpeed = 100
the "and then do" is not part of the script, just so you know
Wait, let me just write an answer
@ZO0PPY, Edit the answer, click the lua button, and copy and paste your code inside it. I'm not gonna answer anything that doesn't have code block. That includes you, @KochbananemitGuave . I'm getting tired of newbies not using code block.
Inside a comment??