--[[local Script]]-- local Tool = script.Parent Tool.Activated:Connect(function() script.SwordCombatRemote:FireServer("Attack") end) --[[Server Script]]-- local Attributes = script.Parent.Parent.Parent.Attributes local Damage = Attributes.Damage.Value local Cooldown = Attributes.Cooldown.Value local CanAttack = true local Combo = 1 script.Parent.OnServerEvent:Connect(function(player) local char = player.Character local Hum = char:WaitForChild("Humanoid") local Root = char:WaitForChild("HumanoidRootPart")
if not CanAttack then return end CanAttack = false
if Combo == 1 then local anim = script.Swing1 local PlayAnim = Hum:LoadAnimation(anim) PlayAnim:Play() Combo = 2 elseif Combo == 2 then local anim = script.Swing2 local PlayAnim = Hum:LoadAnimation(anim) PlayAnim:Play() Combo = 1 end
do you mean equipped? i can help you with that just create a script when player and character is added find the humanoid and use humanoid:EquipTools(YourToolName)
i dont know how to find a humanoid can u give me a full script for the equip? i typed the humanoid:EquipTools(Sword) but it didnt work because humanoid was unkown.
no full scripts.. but you gotta index all of it.. if you are new on development it might be tough local char = game:GetServce("Players").LocalPlayer.Character local Humanoid = char:WaitForChild("Humanoid") Humanoid:EquipTools(YourSwordName) there are informations about this on dev forums
--[[local Script]]--
local Tool = script.Parent
Tool.Activated:Connect(function()
script.SwordCombatRemote:FireServer("Attack")
end)
--[[Server Script]]--
local Attributes = script.Parent.Parent.Parent.Attributes
local Damage = Attributes.Damage.Value
local Cooldown = Attributes.Cooldown.Value
local CanAttack = true
local Combo = 1
script.Parent.OnServerEvent:Connect(function(player)
local char = player.Character
local Hum = char:WaitForChild("Humanoid")
local Root = char:WaitForChild("HumanoidRootPart")
if not CanAttack then return end
CanAttack = false
if Combo == 1 then
local anim = script.Swing1
local PlayAnim = Hum:LoadAnimation(anim)
PlayAnim:Play()
Combo = 2
elseif Combo == 2 then
local anim = script.Swing2
local PlayAnim = Hum:LoadAnimation(anim)
PlayAnim:Play()
Combo = 1
end
wait(Cooldown)
CanAttack = true
end)
Great tutorial! keep up the good work
will do!
Coool
Ty
A can't get the animation to work.
There Ain't No Way It Doesn't work watch the tutorial and get the script on pinned comment
I made 4 animations can I still use this?
Yes You can, just add some variables like if
combo == 2 then
combo = 3
if combo == 3 then
combo == 1
some thing like that
@@Sen23456 I can not lie this didn’t work
it's an example code.. if it didn't work check the output what's missing and what's the problem
how do i get the sword to get in my inventory automatically?
do you mean equipped? i can help you with that just create a script when player and character is added find the humanoid and use humanoid:EquipTools(YourToolName)
i dont know how to find a humanoid can u give me a full script for the equip? i typed the humanoid:EquipTools(Sword)
but it didnt work because humanoid was unkown.
no full scripts.. but you gotta index all of it.. if you are new on development it might be tough
local char = game:GetServce("Players").LocalPlayer.Character
local Humanoid = char:WaitForChild("Humanoid")
Humanoid:EquipTools(YourSwordName)
there are informations about this on dev forums
SONG NAME?
i don't know either i just found it on Xenesr outro 😭😭