Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone fix this?

Torso,Humanoid=script.Parent:FindFirstChild("Torso"),script.Parent:FindFirstChild("Humanoid")

walkhight=2
jumphight=6
gus=3									--GUS=grid unit size
increments=100							--the hight and width in GUS format
runthreats={"TimeBomb","Part","Cannon Shot"}	--threats to run from
grid={}									--(table of tables) topographic map
grid2={}
removechildlist={}
checkpoints={}
branches={}
failed=false

function round(h)
	local mult=10^0
	return math.floor(h*mult+0.5)/mult
end

function stop()
	Humanoid:MoveTo(Torso.Position, Torso)     -- LINE IS BROKEN HERE
end

function checkonmap(x,z)
	if x<=increments and x>0 and z<=increments and z>0 then
		return true
	end
end

function printmap()
	for i=1, increments do
		print(table.concat (grid[i], ' '))
	end
end

Line is broken, please fix!

1 answer

Torso= script.Parent:FindFirstChild("Torso"); Humanoid = script.Parent:FindFirstChild("Humanoid")

walkhight=2
jumphight=6
gus=3                                   --GUS=grid unit size
increments=100                          --the hight and width in GUS format
runthreats={"TimeBomb","Part","Cannon Shot"}    --threats to run from
grid={}                                 --(table of tables) topographic map

grid2={}

removechildlist={}
checkpoints={}
branches={}

failed=false
function round(h)
    local mult=10^0
    return math.floor(h*mult+0.5)/mult
end
function stop()
    Humanoid.Parent:MoveTo(Torso.Position)     -- LINE IS BROKEN HERE
end

function checkonmap(x,z)
    if x<=increments and x>0 and z<=increments and z>0 then
        return true
    end
end
function printmap()
    for i=1, increments do
        print(table.concat (grid[i], ' '))
    end
end

2 comments

0

I edited the post.

0

I edited my answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.