I was experimenting and coding, watching tutorials and stuff like that. Then, I decided to make a speed block. I did a script and it didn’t work. Is there anything wrong?
local function steppedOn(part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent) then
parent.Humanoid.Walkspeed = 37
end
end
speed.Touched:connect(steppedOn)
Are there any errors in the output? Well you forgot to capitalize WalkSpeed, try this:
local function steppedOn(part)
local parent = part.Parent
if game.Players:GetPlayerFromCharacter(parent) then
parent.Humanoid.WalkSpeed = 37
end
end
speed.Touched:connect(steppedOn)
local function steppedOn(part)
local parent = part.Parent
if part.Parent and game.Players:GetPlayerFromCharacter(part.Parent) then
part.Parent:FindFirstChild("Humanoid").WalkSpeed = 37
end
end
speed.Touched:connect(steppedOn)