#how do i make a tool
1 messages · Page 1 of 1 (latest)
how do i make a tool
work
i have model
it has handle
handle inside tool
its welded
inside starterpack
but
its in my inventory
it doesnt appear
in my hand
You should try and like put all that into one message, not super sure why you had to do that line by line
Is the primary part of the tool the Handle? Is it called "Handle" exactly?
hey moontune
i added animations and stuff
but
let me send u a video
and yes its called Handle
@tiny bone
how can i fix this?
it isnt attached to the player
Brother please you can type one message before you're sending it, you don't have to do one sentence/word per message
Show me the tool in the explorer
And so everything is welded to the handle? The tool's PrimaryPart is set to that Handle?
let me check
ok i just made sure they all have handle, but its all at part1, is the correct? or should it be part0
ooo wait i just did it, but its rotated incorrectly
let me fix that 1 sec
uhh
ok so i tried rotating it but its just stuck sideways, ill send you a video real quick
@tiny bone
huh just rotate it again
in your tool instance theres a grip position and orientation
mess with it to get it the right way
what if i just paste the current position and orientation into it
** You are now Level 8! **
i set it at 0 to position and orientation
???
that should be the default its fine
just mess with it a bit to get it how you want it
just add a sound instance store it inside your tool and play it when you activate the tool
use the signal
Tool.Activated:Connect
uh
can i give u the script
and u put a sound inside of it
ill give the audio
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local equip = humanoid:LoadAnimation(script:WaitForChild("Equip"))
local use = humanoid:LoadAnimation(script:WaitForChild("LeftSlash"))
equip.Priority = Enum.AnimationPriority.Action
use.Priority = Enum.AnimationPriority.Action
equip.Looped = false
use.Looped = false
local tool = script.Parent
tool.Equipped:Connect(function()
equip:Play()
end)
tool.Activated:Connect(function()
use:Play()
end)```
thats the script
and this is the audio rbxassetid://2101658119
wait where
no
where
ohh
wait nthn
i found out
ok its not working
i cant do it
ples do it
dont ask people to do it
i cant do it
i pasted the code inside the tool.Activated:Connect(function()
use:Play() and it doesnt slash anymore
i did it like this
tool.Activated:Connect(function()
use:Play(2101658119)
reference the sound instance
huh
no wait is use the sound?
you dont paste the id inside the script
i just put inside the handle?
have you added a sound object?
where tho
you dont need to
no paste your id to soundID
now
go back to your local script and just reference the sound object
Sound:play()
and it should play
the numbers or should i include the rbx asset id thing
rbx asset id
The LeftSlash animation asset should have the ID set there. You do not pass the ID to the play function.
huh
You know when you put the animation object under the script?
ye
The animation ID is a property on that.
Yes so click on "LeftSlash" and look at the AnimationID property
this? rbxassetid://74894663
That is the AnimationID I assume
wdym by property
Cool. So now on use you can just do :Play()
and paste the sound id?
i dont have to
the sword works
the animation works, but the sound doesnt play, thats what im trynna do
You're not even playing the sound when the tool activates
how i do that
Same kinda way you do animations. You have a sound asset that you give an ID, then grab it in script, and call :Play() on it. You don't need to load it like an animation though.
if i paste the script can u edit it and then ill paste the sound id or however it works
Nope
Do it yourself
