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

Sword attached At the back of the Character?

Asked by
Zero_Tsou 175
5 years ago
Edited 5 years ago

I want to know more about CFrames, How i Put a Sword, ( or any block ) on the back of the players characters ( when they spawn and doesn't reset when reseting ) Just like in SwordBurst 2, Can you help me out please? , Sorry if you didn't understand my Question.

1 answer

Log in to vote
0
Answered by 5 years ago

First of all, check to see if a sword is inside the player's backpack. If it is, then clone the sword, or part in question onto their back.

An example of this would be to use the Vector3 option to get the positioning on the sword. Here's some sample code, but only for the Vector3 part.

local Item = game.ReplicatedStorage.Item:Clone() -- If it isn't in replicated storage, change it to whatever storage you're using.
Item.Position = Player.Character.Torso + Vector3.new(x, x, x) -- You'll need to adjust this value in order to get the proper location for the item. Use subtraction on either the X or Z scale to get it towards the back.

If I'm not mistaken, this should move it onto the player's back. But when or how you want it to appear there in the first place is up to you.

0
I recommend using CFrame rather than position SteamG00B 1633 — 5y
0
Actually yes. CFrame will get the Orientation too rather than just the positioning itchymoonfire 179 — 5y
Ad

Answer this question