Hello! Im making a game and im making a speed potion, but when i press shift it sets the speed to regular running speed, i try to disable the script, as its just a local script inside startergui, but when i disable it through script, it still allows you to press shift and set it back to regular running speed. how do i fix this?
script.Parent.Parent.Activated:connect(function() local player = game.Players.LocalPlayer or game.Players.PlayerAdded.Wait() local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local uis = game:GetService("UserInputService") local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://9622067571" humanoid:LoadAnimation(anim):Play() script.Parent.Parent.Parent.Parent.Parent.StarterGui["Character Controller "].Disabled = true script.Parent.Parent.Parent.Parent.Parent.StarterGui["Character Controller "].ServerSide.Disabled = true wait(3.26) humanoid.WalkSpeed = 100 end)
thanks!
I think you should use
humanoid.WalkSpeed = humanoid.WalkSpeed + 25 wait(3.16) humanoid.WalkSpeed = humanoid.WalkSpeed - 25
for both the run script and potion instead of changing it to a direct value