#i need help idk why it wont work
123 messages · Page 1 of 1 (latest)
can you make it work?
Local punch1 = script.punch/1 won’t even work
why?
What you want, what even it for
to play a punch animation
Script.punch is a what type
You need do local punch1 = script[“punch/1”]
let me try it
** You are now Level 1! **
Or I think it gonna use str divide str
Does it give you an error code?
nope
Ok wait let’s me see
tysm btw
Add a print after Anim:play()
print?
wait
think i found eror
when i click q nothing happens
punch is not a valid menber of localscript "players.myusername.Playerscripts.m1 attacks"
…
** You are now Level 8! **
am i st upid?
You even not read the error log
can i screen share?
Just screenshot I am not in home
** You are now Level 2! **
Did u add print?
idk whwat that means
What is the code you have rn
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script.punch/1
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
end
end)
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script.punch/1
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
print(“Played”)
end
end)
Use this instead
When you press Q it should have Output Played in F9
its meant to be in starter player scripts right?
Just add print(“Played”) after Anim:play()
i did
Cuz I am on phone so you need type yourself not copy and paste
oh
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script{"punch/1"}
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
print("Played")
end
end)
😦
Look here
like that
Is that fixed?
let me check
yeah
i added what u said
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script{"punch/1"}
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
print("Played")
end
end)
Not{}
It should be []
Any error?
Np
NOW
Now you can remove print
"bool"
on google?
No
boolvalue?
** You are now Level 3! **
Yes
ok
Then rename bool to isusing
aight
Better do no space and no cap
Send me the newest script
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script["punch/1"]
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
print("Played")
end
end)
local rs = game.ReplicatedStorage
local ws = game.Workspace
local UIS = game:GetService("UserInputService")
local punch1 = script["punch/1"]
UIS.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
script.isusing.Value = true
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Anim = Humanoid:LoadAnimation(punch1)
Anim:Play()
script.isusing.Value = false
end
end)
You can copy and paste that
will it deal damage?
Not now, this set allow deal damage when swing
You need another script to deal damage
Or using(not swing)
so what next?
ok now i am on PC