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

How would I be able to attach model to back of players?

Asked by
iLordy 27
5 years ago

I would like for when the players to spawn in my game to have a jetpack or a sword attached to their back. However I have no clue on how to start this. If you have any tips on how I can accomplish this please let me know

4 answers

Log in to vote
0
Answered by 5 years ago

Use welding.

0
Yes, welds are definitely the way to go OBenjOne 190 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

https://developer.roblox.com/api-reference/class/Weld you would want to change the property of part1 to be the part and part0 to be the player and use C0 to move it around

    local Weld = Instance.new("Weld")
    Weld.Parent = Head
    Weld.Part0 = Head
    Weld.Part1 = Hair
    Weld.C0 = (CFrame.new(0, 0.9, 0.3)) * CFrame.Angles(math.rad(0), (0), 0)

This one is for hair

Log in to vote
0
Answered by
k5a15 2
5 years ago

I dunno cuz I a "smart"

Log in to vote
0
Answered by 5 years ago

Weld

As mentioned in a couple answers, welding is often used to attach objects together. You would weld the model together itself, then weld a part from that model to the character.

I want to mention something here. If there are many parts in the model, I would not suggest welding them but rather making them a mesh or union. I made scripts for a clan and encountered lag issues due to too many moving parts.

Loop

By loop, I mean like using RunService to continuously set the PrimaryPart CFrame of the Model. This would be impractical but could work depending on what you are trying to achieve.

Animation

I would recommend animations for attaching things to players. It may be tricky to do depending on the situation, but it comes in handy in the long run.

It makes transitions smoother, is less laggy since it is client-based, and it is easier to use. This would require the model to be a mesh or even a combination of welding.

Explore other methods and do what suits for you! Good luck!

Answer this question