|
| 28 Jul 2015 11:00 PM |
error in output; 20:58:59.071 - lavaClone.CFrame = script.Parent.Drop.CFrame - Vector3.new(:1: attempt to index global 'script' (a nil value)
what is wrong with this line? lavaClone.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1,0) |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:04 PM |
| do you declare script as nil or something before that line? |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:05 PM |
while true do wait(2) local lavaa = game.ReplicatedStorage:FindFirstChild('Lava Brick') local lavaClone = lavaa:Clone() lavaClone.Parent = workspace local cash = Instance.new('IntValue') cash.Parent = lavaClone cash.Value = 1 lavaClone.CFrame = script.Parent.Drop.CFrame - Vector3.new(0,1,0) game:GetService("Debris"):AddItem(lavaClone, 1) end |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:07 PM |
| Wait, are you running this in the dev console? Like is this an actual script instance? |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:13 PM |
im not running in dev console i saw the error in the output window
also, here is the script that is supposed to take away the Lava brick which is not working
script.Parent.Touched:connect(function(lava) if (lava.Name == 'Lava Brick') then lava.Position = Dispenser.Position --or use CFrame else print('Not lava.') end end) |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:15 PM |
| If it's not a script instance (Command bar, loadstring, dev console loader, Studio script runner), then "script" will not exist |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2015 11:22 PM |
I dont get what your saying can you please explain? Sorry im new to scripting
--this is the collector script for the lava bricks which is not working
script.Parent.Touched:connect(function(lava) if (lava.Name == 'Lava Brick') then lava.Position = Dispenser.Position --or use CFrame else print('Not lava.') end end) |
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 28 Jul 2015 11:24 PM |
He means:
Is your code in a script?
As in a physical script in the explorer window.
Insert > Object.. > Script |
|
|
| Report Abuse |
|
|
| |
|