I am trying to make a dash ability for my game but when I coded the speed boost to be added it was setting the walkspeed to the value instead of adding and yes the walkspeed thats being added too the value before is 16
Are you sure the walkspeed is not 0 while adding 15? Try printing the value before increasing it
This works perfectly fine:
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Humanoid : Humanoid = Character:WaitForChild("Humanoid")
while task.wait(1) do
Humanoid.WalkSpeed += 1
end
end)
end)
Have you tried finding out what it prints before making changes. If it’s returning nil then it can’t access that and you may want to do it via remote events or remote functions since modules are more for storing and retrieving data