Trying to make a part that increases your speed when touching it and resets your speed when you stopped touching it. Its weird since it prints 100 as walkspeed but it dousent actually increase the walkspeed
local getplr = game.ReplicatedStorage.GetLocalPlr
getplr.OnServerEvent:Connect(function(plr)
local part = script.Parent
local hum = plr.Character:FindFirstChild("Humanoid")
print(plr)
part.Touched:Connect(function()
print("speed")
hum.WalkSpeed = 100
print(hum.WalkSpeed)
end)
part.TouchEnded:Connect(function()
print("Slow")
hum.WalkSpeed = 16
print(hum.WalkSpeed)
end)
end)
its chancing the hum walkspeed, when i try to print the walkspeed it also says 100 but my actual walkspeed remains the same i dont really understand ur question tho
local part = script.Parent
part.Touched:Connect(function(hi)
local p = hi and hi.Parent:FindFirstChildWhichIsA("Humanoid")
if p then
p.WalkSpeed = 100
end
end)
part.TouchEnded:Connect(function(hi)
local p = hi and hi.Parent:FindFirstChildWhichIsA("Humanoid")
if p then
p.WalkSpeed = 16
end
end)