Two things I would fix for anyone using the code. First, at 21:30, make sure to add a check to make sure that your health doesn’t go over the max. Fix this by doing: if Stamina.Value ~= MaxStamina.Value then If Stamina.Value + 2 > MaxStamina.Value then Stamina.Value = MaxStamina.Value Else Stamina.Value += 2 End End Secondly, I wouldn’t use this way of increasing stamina at all. Using percentage is better for when your max stamina increases. This can be done by replacing Stamina.Value += 2 With Stamina.Value += MaxStaminaValue * 0.05
There are 2 things that I want to talk about, first thing if u want to make "not enough stamina" system that is the edit of the DashHandler script in the server script service: local rep = game:GetService("ReplicatedStorage") local Remote = rep:FindFirstChild("RemoteEvents").Movement.DashEvent Remote.OnServerEvent:Connect(function(plr) local StaminaVal = plr.Stats.Stamina StaminaVal.Value -= 20 if StaminaVal.Value < 5 then return end local hrp = plr.Character:FindFirstChild("HumanoidRootPart") local bv = Instance.new("BodyVelocity", hrp) bv.Velocity = hrp.CFrame.LookVector * 100 bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge) game.Debris:AddItem(bv, .5) end) And here it is the edit on the DashHandler Local Script in the replicated first: local uis = game:GetService("UserInputService") local rep = game:GetService("ReplicatedStorage") local plrs = game:GetService("Players") local Anims = rep:WaitForChild("Anims") local DashAnim = Anims.Movments.Dash local Remote = rep:FindFirstChild("Remotes").Movement.DashEvent local plr = plrs.LocalPlayer local cd = false local Stamina = plr:WaitForChild("Stats").Stamina uis.InputBegan:Connect(function(input,gpe) if gpe or Stamina.Value < 5 then return end if input.KeyCode == Enum.KeyCode.Q and not cd then cd = true local hum = plr.Character:FindFirstChild("Humanoid") hum:LoadAnimation(DashAnim):Play() Remote:FireServer() task.wait(1) cd = false end end) so this is the "not enough stamina" system but I noticed that there is a problem when the value of stamina is under 0 the blue Ui go to left outside of the frame and there is another problem when I dash the animation of dash get mixed with the walking anim when I'm in the land but when I'm in the Air the anim is working well and for the anim priority I checked about it and it is set in action so what is the solve of this problem? And also I think that this system is not completed because there is no VFXs and SFXs and also I think that u can add more animations for the dash system like when u want to dash backward there is an animation for it and if u want to dash to left or right side there is an animation for it and also add 2 animation to the dash to forward like blox fruits and also there a problem when u die the Ui of health and stamin is will not work anymore
Tomorrow is my birthday!!
Happy birthday
happy birthday
HAPPY BIRTHDAY❤
yay
Happy birthday
Very cool. Waiting for part 6!
Two things I would fix for anyone using the code.
First, at 21:30, make sure to add a check to make sure that your health doesn’t go over the max. Fix this by doing:
if Stamina.Value ~= MaxStamina.Value then
If Stamina.Value + 2 > MaxStamina.Value then
Stamina.Value = MaxStamina.Value
Else
Stamina.Value += 2
End
End
Secondly, I wouldn’t use this way of increasing stamina at all. Using percentage is better for when your max stamina increases. This can be done by replacing
Stamina.Value += 2
With
Stamina.Value += MaxStaminaValue * 0.05
Oh nice thx
please don't stop you are amazing and you are helping me a lot
Keep going!
Very cool keep this up please!
Happy early birthday Voiceless
ty
Happy Birthday
There are 2 things that I want to talk about, first thing if u want to make "not enough stamina" system that is the edit of the DashHandler script in the server script service: local rep = game:GetService("ReplicatedStorage")
local Remote = rep:FindFirstChild("RemoteEvents").Movement.DashEvent
Remote.OnServerEvent:Connect(function(plr)
local StaminaVal = plr.Stats.Stamina
StaminaVal.Value -= 20
if StaminaVal.Value < 5 then return end
local hrp = plr.Character:FindFirstChild("HumanoidRootPart")
local bv = Instance.new("BodyVelocity", hrp)
bv.Velocity = hrp.CFrame.LookVector * 100
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
game.Debris:AddItem(bv, .5)
end)
And here it is the edit on the DashHandler Local Script in the replicated first:
local uis = game:GetService("UserInputService")
local rep = game:GetService("ReplicatedStorage")
local plrs = game:GetService("Players")
local Anims = rep:WaitForChild("Anims")
local DashAnim = Anims.Movments.Dash
local Remote = rep:FindFirstChild("Remotes").Movement.DashEvent
local plr = plrs.LocalPlayer
local cd = false
local Stamina = plr:WaitForChild("Stats").Stamina
uis.InputBegan:Connect(function(input,gpe)
if gpe or Stamina.Value < 5 then return end
if input.KeyCode == Enum.KeyCode.Q and not cd then
cd = true
local hum = plr.Character:FindFirstChild("Humanoid")
hum:LoadAnimation(DashAnim):Play()
Remote:FireServer()
task.wait(1)
cd = false
end
end)
so this is the "not enough stamina" system but I noticed that there is a problem when the value of stamina is under 0 the blue Ui go to left outside of the frame and there is another problem
when I dash the animation of dash get mixed with the walking anim when I'm in the land but when I'm in the Air the anim is working well and for the anim priority I checked about it and it is set in action so what is the solve of this problem?
And also I think that this system is not completed because there is no VFXs and SFXs and also I think that u can add more animations for the dash system like when u want to dash backward there is an animation for it and if u want to dash to left or right side there is an animation for it and also add 2 animation to the dash to forward like blox fruits and also there a problem
when u die the Ui of health and stamin is will not work anymore
If your stamina ever falls under 0 you need to add more checks to ensure that you can only use stamina that you have.
Yo do you fix the gui didnt work when died?
How to put sound in the dash ?
Dash .... What about phone player ?
Hey! Can we get a new discord link?
it's in the description
Bookmark 7:28