Need help
#1
Hello. I know LUA pretty well on roblox, and I'm used to the workspace on it, similar to this one. When I run 'game.World.Err:Remove()' on the command line, it says 'Err is not a child of world' Any clues on what I'm doing wrong? Im using this as a test to make a helicopter regen.
Reply
#2
Here's the code Paradox was attempting to fix for you:

[lua]
Heli = game.Environment.Helicopter
function OnCollide(collide)
h = Heli:clone()
h.Helip.Position = Vec2D(324.62,51.54)
if game.World:getChild("Helicopter") then
game.World.Helicopter:Remove()
end
end

link(script.Parent.Collide, OnCollide)
[/lua]
____________________________________________
[lua]
local enabled = true
link(script.Parent.Collided, function(hit)
if hit.Parent:isA("Character") and enabled then
local copter = game.Storage.Helicopter
local c = copter:clone()
local oldcop = game.World:getChild("Helicopter")
if oldcop then
oldcop:remove()
end
enabled = false
script.Parent.Color = Color(255, 0, 0)
sleep(3)
c.Parent = game.World
c:makeJoints()
script.Parent.Color = Color(0, 255, 0)
enabled = true
end end)
[/lua]

I think the makeJoints part needs work; I might be remembering it wrong.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)