Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a sword model a gear?

Asked by 5 years ago

I want to make a sword model a gear. I also would like to know how to make dual wielded models into usable gear (I already have the animations, hopefully). Do I need to make a new part and have the player hold it from there or just script? Also where do I add the animation for the gear. I will try to answer comments if you want me to elaborate. Final Note: I want to know how to do damage when they make contact with another player.

1 answer

Log in to vote
0
Answered by 5 years ago

to make the sword model a gear, make sure its welded together and put it inside a gear instance. If you want to dual wield the swords then add a script inside the gear that welds the sword handle onto the player's hand/arm when the player equips the swords. Inside the script, you could also make the player do the animations you have made by adding animation instances to your gear and playing them by doing. (make sure animation priority is action)

local animation = player.humanoid:LoadAnimation(animation_instance)
animation:play()

to do the damage, make a touching event for the sword so when a player touches it, it will do damage to them.

blade.Touched:Connect(function(hit)
    humanoid= hit.Parent.FindFirstChild("Humanoid")
    if humanoid then
        humanoid:TakeDamage(10)
    end
end)
0
Thanks! I'm not sure what a gear instance is. Where do I put the script? Also what is the script that dual welds? DrxTheKorbloxian 4 — 5y
0
oops i meant a tool instance. You can put the script inside the tool and you have to make the script to dual weld yourself since you have to weld it with cframe positioning Ido_nothaveUsername 213 — 5y
0
Okay, where do I put the tool? DrxTheKorbloxian 4 — 5y
0
Hey I'm a bit confused, okay if we message each other tomorrow? Disc is Drxcynix#9037 DrxTheKorbloxian 4 — 5y
0
you put the tool in the starterpack and each player will spawn with it, otherwise you could give it to a player by putting it in their backpack( a part of their character), you should try and take a free model of a sword or dual sword to see how it works. Normally each tool has a local script which gets input from the player(like if they click the mouse) and sends it to the server to do stuff Ido_nothaveUsername 213 — 5y
Ad

Answer this question