|
| 22 Mar 2014 08:04 PM |
i need to use instance.new() to create a part on the player's position.
How do i get the position of the player?
(1 person server) |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Mar 2014 08:32 PM |
| I think you do char[Torso]CFrame or char[Torso].CFrame. But locate char first. Oh and instead of Torso if you want Right arm in the braces put the body part. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 08:34 PM |
I got it. (in this example locate char as the character, also exchange bodypart to the part you want the CFrame of)
char["bodypart"].CFrame |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 08:48 PM |
i dun know how to get char tho
im a noob and i need the whole script plz |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Mar 2014 09:33 PM |
Here you go.
g = Instance.new("Part", game.Workspace) g.Position=Vector3.new(game.Workspace.PlayerName.PlayerPart)
It should work.
:SYSTEM:User:TheBenSquare:Loading:Error |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 09:34 PM |
| but i dont know the player name |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 09:36 PM |
The player name is the username.
The player part is stuff like Torso, Head, Left Arm, Right Arm, Left Leg, Right Leg.
:SYSTEM:User:TheBenSquare:Loading:Error |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 09:38 PM |
ya but
im not refrencing a specific character
i want to refer to anyone |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 22 Mar 2014 09:39 PM |
new=Instance.new("Part", Workspace)
for i,v in pairs(game.Players:GetChildren) do if v:IsA("Player") then new.Position=v.Character.BODYPART end
I think that will work. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 09:40 PM |
Oh. You said simple, that's not simple to spawn a brick on a random person. Math.random won't be random from the people there, it'll just be plain random.
:SYSTEM:User:TheBenSquare:Loading:Error |
|
|
| Report Abuse |
|
|
ZerefSan
|
  |
| Joined: 14 Jun 2011 |
| Total Posts: 1068 |
|
|
| 22 Mar 2014 09:40 PM |
NOPE
(game.Players:GetChildren()) |
|
|
| Report Abuse |
|
|
| |
|