Avocation
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 107 |
|
|
| 28 Sep 2014 09:09 PM |
I have been trying to make this script work
I have a bunch of number values for the XYZ thing and I have a script that sets the X,Y,Z number values every 10 seconds.
What am I doing wrong?
local player = script.Parent.Parent.Parent
local xyz = player.XYZPos
local xval = xyz.X.Value local yval = xyz.Y.Value local zval = xyz.Z.Value
function onClicked() player.Character.Torso.CFrame = CFrame.new(xval, yval, zval) end
script.Parent.Button.MouseButton1Down:connect(onClicked)
|
|
|
| Report Abuse |
|
Cawlonee
|
  |
| Joined: 03 Mar 2014 |
| Total Posts: 2687 |
|
|
| 28 Sep 2014 09:19 PM |
XYZ Isn't a member of a player.
I can't tell what you're trying to do.
In order to get the player's Position, do:
pos = player.Character.Torso.Position
local xval = pos.X local yval = pos.Y local zval = pos.Z |
|
|
| Report Abuse |
|