Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Change Character Speed Using the Preset Infinite Runner Game?

Asked by 5 years ago
Edited 5 years ago

Hi!

Im using the Roblox preset infinite runner game and I know how to change the speed but I want to know how to change the speed using a button, I have tried numerous times experimenting but i keep failing.

here is the code for the player manager where it gets the walkspeed

wait()      
character.Humanoid.WalkSpeed = Configurations.WalkSpeed
character.Torso.CFrame = CFrame.new(Vector3.new(0,slotHeight + 5,0))
character.Torso.CFrame = CFrame.Angles(0, math.pi,0) * character.Torso.CFrame 

character:WaitForChild("Humanoid").Died:connect(function()
running = false
trackManager:Clear()
end)    

and heres the code where it sets the walkspeed

local Configurations = {}
    Configurations.TileSize = 88
    Configurations.MaxMapSize = 100
    Configurations.PointsPerPickup = 50
    Configurations.WalkAnimation = 'rbxassetid://252557606' 
    Configurations.SlideAnimation = 'rbxassetid://167999808'
    Configurations.StrafeSpeed = .15
    Configurations.WalkSpeed = 90

again im trying to change the walkspeed using a GUI button, if you dont understand something please let me know what else you need to know.

Answer this question