So im trying to make jojo stand just for fun.
I made stand and now i want him to be able to hit.
Im following this tutorial(because im new to scripting): Roblox How To | Making a JoJo Stand Part 2 - YouTube
I did everything he did and i thing i got that right but the animation punch doesnt play.
There is no error and nothing on the output.
please help
Script:
Punching(Local Script):
local Player = game:GetService("Players").LocalPlayer
local rp = game:GetService("ReplicatedStorage")
local Punch = rp:WaitForChild("Punch")
local UIS = game:GetService("UserInputService")
local debounce = false
local comSeq = ""
local currTime = 0
local prevTime = 0
local cds =
{
cd1 = .25;
cd2 = 1;
}
UIS.InputBegan:Connect(function(input,isTyping)
if isTyping then
return
elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
if debounce == false then
debounce = true
currTime = os.clock()
local passTime = currTime - prevTime
if passTime < 1 then
comSeq = comSeq.."L"
if string.len(comSeq) > 3 then
comSeq = "L"
end
else
comSeq = "L"
end
Punch:FireServer(comSeq)
end
end
end)
Punch.OnClientEvent:Connect(function(canPunch)
if canPunch then
--Player has stand Equipped
prevTime = currTime
wait(cds.cd1)
debounce = false
else
--Player doesnt has stand Equipped
wait(cds.cd2)
debounce = false
end
end)
Punching(Server Script):
local rp = game:GetService("ReplicatedStorage")
local Punch = rp:WaitForChild("Punch")
local Animations = script:WaitForChild("Animations")
local R15 =
{
["L"] = Animations.R15.Combat1,
["LL"] = Animations.R15.Combat2,
["LLL"] = Animations.R15.Combat3,
}
Punch.OnServerEvent:Connect(function(Player,comSeq)
local Character = Player.Character
local Humanoid = Character.Humanoid
local HumanoidRP = Character.HumanoidRootPart
local Stand = Character:FindFirstChild("Stand")
if Stand then
--id stand is found
local AnimControl = Stand:FindFirstChild("AnimControl")
if AnimControl then
--/Animation to be play
local Action
local HumanoidType = AnimControl:FindFirstChild("HumanoidType")
if HumanoidType.Value == "R15" then
Action = AnimControl:LoadAnimation(R15[comSeq])
end
Action:Play()
Action.Stopped:Connect(function()
Punch:FireClient(Player,true)
end)
end
else
--if stand is not found
Punch:FireClient(Player,false)
end
end)