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

My Dash script stops working after someone dies. How can I fix this?

Asked by 4 years ago

I was testing this with a frend in the game, and we learned that the script works fine, until you die/reset, then you can't use the dash feature. Here's the script, could anyone tell me if I did something wrong here?

01local player = script.Parent.Parent
02local debounce = false
03local char = player.Character or player.CharacterAdded:Wait()
04local uis = game:GetService("UserInputService")
05local hum = char:WaitForChild("Humanoid")
06local length = .2
07local anim = Instance.new("Animation")
08anim.AnimationId = "rbxassetid://5100521622"
09local didpress = false
10 
11local SOUN = script:WaitForChild("DashSound")
12 
13uis.InputBegan:Connect(function(input, istyping)
14    if istyping then return end
15    if input.KeyCode == Enum.KeyCode.E then
View all 37 lines...
0
where is the script? ProjectInfiniti 192 — 4y
0
you should put this in starter player scripts ProjectInfiniti 192 — 4y
0
Forgot to mention that, sorry. It is in starter player scripts. Eveyrthing works just fine it's just when you die it stops working l3ig_Boss 4 — 4y

Answer this question