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

Sprint not working after death. Help?

Asked by 5 years ago

I am configuring a Stamina Gui. Sprinting, Field of view, and moving stamina bar works. But, when I die, sprinting doesn't work. Every other else work, but the sprinting stop working. I need help.

01local camera = game.Workspace.CurrentCamera
02 
03local TweeningService = game:GetService("TweenService")
04 
05local UIS = game:GetService('UserInputService')
06 
07local Bar = script.parent:WaitForChild('STMBackground'):WaitForChild('Bar')
08 
09local player = game.Players.LocalPlayer
10 
11local NormalWalkSpeed = 16
12local NewWalkSpeed = 50
13 
14local power = 10
15 
View all 92 lines...
0
Quick question, is this script under StarterGui or StarterPlayerScripts / StarterCharacterScripts? Asentis 17 — 5y
0
its on StarterGui Asher0606 36 — 5y
1
Put in under StarterCharacterScripts @Asher0606, a new character is made each time a player respawns but your script doesn't have the reference to it. It only works for the first character since it defines character and plr.Character only once Ankur_007 290 — 5y

Answer this question