#Scripting help
45 messages · Page 1 of 1 (latest)
Send the code here and what solutions you have tried so far
task.wait(1)
--This script should first detect an input, then check what character the player is and then do the corresponding animation for that character--
--The m1 script also needs to be the the four different parts where the person can click 4 different times
print("M1Script has loaded")
local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local combocount = 0
local maxcombo = 4
local Character1 = 1
local Character2 = 2
local Character3 = 3
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
combocount = combocount + 1
if combocount = 1 then
end
print("Character1 m1 has been clicked")
local Anim1 = Instance.new("Animation")
local Anim2 = Instance.new("Animation")
local Anim3 = Instance.new("Animation")
local Anim4 = Instance.new("Animation")
Anim1.AnimationId = "rbxassetid://111272327453748"
Anim2.AnimationId = "rbxassetid://112855633948801"
Anim3.AnimationId = "rbxassetid://115525792006095"
Anim4.AnimationId = "rbxassetid://73309449659534"
local PlayAnim = character.Humanoid:LoadAnimation(Anim1)
PlayAnim:Play()
task.wait(0.5)
end
end)
Holy space
It's ==, not =
for future questions, format it like this
task.wait(1)
--This script should first detect an input, then check what character the player is and then do the corresponding animation for that character--
--The m1 script also needs to be the the four different parts where the person can click 4 different times
print("M1Script has loaded")
local UserInputService = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local combocount = 0
local maxcombo = 4
local Character1 = 1
local Character2 = 2
local Character3 = 3
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
combocount = combocount + 1
if combocount = 1 then
end
print("Character1 m1 has been clicked")
local Anim1 = Instance.new("Animation")
local Anim2 = Instance.new("Animation")
local Anim3 = Instance.new("Animation")
local Anim4 = Instance.new("Animation")
Anim1.AnimationId = "rbxassetid://111272327453748"
Anim2.AnimationId = "rbxassetid://112855633948801"
Anim3.AnimationId = "rbxassetid://115525792006095"
Anim4.AnimationId = "rbxassetid://73309449659534"
local PlayAnim = character.Humanoid:LoadAnimation(Anim1)
PlayAnim:Play()
task.wait(0.5)
end
end)
how did u do it like that?
You can right-click a message and press copy text
It'll also copy the formatting, so see it for yourself
my discord crashed
^ how it felt while you were gone
mean
wait
why are you creating a new animation every single time someone presses m1
i was gonna change that
i have it set up
just gonna get the script to atleast work
before i do it
whatever a simple solution is :LoadAnimation(PunchAnims[combocount])
and place the
animations in a table called PunchAnims
Preferably load them beforehand
can we go in a call bc im a little lost?
im hopping off now
queln
no
dam