KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 22 Mar 2014 01:36 PM |
look at the script first...
NP = Game.Lighting.PLANETNAME Frame = script.Parent.Parent PlanetRadius = Frame.PlanetRadius PR = PlanetRadius.Radius.Text PlanetPosition = Frame.PlanetPosition PPX = PlanetPosition.X.Text PPY = PlanetPosition.Y.Text PPZ = PlanetPosition.Z.Text
function onClicked() NewPlanet = NP:Clone() NewPlanet.Parent = Game.Workspace NewPlanet.Head.OSR.Scale = Vector3.new(PR,PR,PR) NewPlanet.Head.CFrame = CFrame.new(PPX,PPY,PPZ)--right here NewPlanet.Name = Frame.PlanetName.Text end script.Parent.MouseButton1Down:connect(onClicked)
the line that i put "right here" is the problem. Even when i change the gui text and click this gui button with this script inside, it still puts the planet in the same place :\ any ideas?
|
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 01:39 PM |
OK, don't use the '.Text' part, you are preventing the updating of the value when you call it. It is like putting 'Var = game.Workspace.SomeValue.Value'
Use PPX = PlanetPosition.X tonumber(PPX.Text) |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 22 Mar 2014 01:42 PM |
| im still getting 0,50,0 tho |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
|
| 22 Mar 2014 02:29 PM |
NP = Game.Lighting.PLANETNAME Frame = script.Parent.Parent PlanetRadius = Frame.PlanetRadius PR = PlanetRadius.Radius PlanetPosition = Frame.PlanetPosition PPX = PlanetPosition.X PPY = PlanetPosition.Y PPZ = PlanetPosition.Z
function onClicked() NewPlanet = NP:Clone() NewPlanet.Parent = Game.Workspace NewPlanet.Head.OSR.Scale = Vector3.new(PR.Text,PR.Text,PR.Text) NewPlanet.Head.CFrame = CFrame.new(PPX.Text,PPY.Text,PPZ.Text)--right here NewPlanet.Name = Frame.PlanetName.Text end script.Parent.MouseButton1Down:connect(onClicked)
|
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|