namejoe
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 137 |
|
|
| 08 Nov 2013 03:21 PM |
script 1 =
number = 1 function onButtonClicked(hit) model = game.Lighting.Model lol = script.Parent.Parent.Parent.Parent.Name
anothermodel = model:clone() anothermodel.Parent = workspace anothermodel.Name = number number = number + 1 anothermodel:MakeJoints() end script.Parent.MouseButton1Down:connect(onButtonClicked)
script 2 =
Car = game.Workspace
function onButtonClicked(hit) player = number Workspace.player.Head.RocketPropulsion.Target = script.Parent.Parent.Parent.Parent.Character.Head Workspace.nplayer.Head.RocketPropulsion:fire() end script.Parent.MouseButton1Down:connect(onButtonClicked)
when i click the gui with script 2, nothing happens!!! it is supposted to make the block with the number move at me!
|
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 03:24 PM |
you are using workspace.player and workspace.nplayer. Spelling error? Is this an NPC?
Also number is undefined in the second script. |
|
|
| Report Abuse |
|
|
namejoe
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 137 |
|
|
| 08 Nov 2013 03:27 PM |
how do i define number as the current value of the first script number
it is supposted to follow you |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 03:29 PM |
Use
_G.Number instead of Number. It will make it accessible. If they are bot the same type of script. |
|
|
| Report Abuse |
|
|
namejoe
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 137 |
|
|
| 08 Nov 2013 03:35 PM |
now my script is
Car = game.Workspace
function onButtonClicked(hit) player = G.number Workspace.player.Head.RocketPropulsion.Target = script.Parent.Parent.Parent.Parent.Character.Head Workspace.player.Head.RocketPropulsion:fire() end script.Parent.MouseButton1Down:connect(onButtonClicked)
still not follwoing |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 03:38 PM |
_G.Number not G.Number
And you have to put _G.Number in the first script too. |
|
|
| Report Abuse |
|
|
|
| 08 Nov 2013 03:39 PM |
| Also do you have the hierarchy right for getting the player? |
|
|
| Report Abuse |
|
|
namejoe
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 137 |
|
|
| 08 Nov 2013 03:41 PM |
i have a test for a model
wothout creation it owrks
i will try
|
|
|
| Report Abuse |
|
|
namejoe
|
  |
| Joined: 01 Dec 2010 |
| Total Posts: 137 |
|
|
| 08 Nov 2013 03:43 PM |
still not working it wont come
|
|
|
| Report Abuse |
|
|