#racing boat game

95 messages · Page 1 of 1 (latest)

gloomy ravine
#

First off the fuck is that punctuation

#

Also

#

Show your code

dapper basin
#

ok

#

gimme a second

#

im reloading studio

#

itll be in the titanic model

#

local titanic = script.Parent
local hitbox = titanic.Hitbox
local icebergs = game.Workspace.Meshes:GetChildren()

hitbox.Touched:Connect(function(part)
if part == icebergs then
titanic.Driveing.Drive:Destroy()
wait(5)
titanic:Destroy()
end
end)

dapper basin
dapper basin
#

bruh it doesnt work ill rewrite the script

#

gimme a sec

gloomy ravine
#

If course that won't work

#

What you can do ks

dapper basin
#

i got a version that works

#

but like

gloomy ravine
#
if table.find(icebergs, part) then ... end
dapper basin
gloomy ravine
dapper basin
gloomy ravine
#

Just one

dapper basin
#

ah shi i planned to have more then 1 iceberg

gloomy ravine
#

I thought u meant multiple scripgs

dapper basin
#

nah

#

btw i have a question

gloomy ravine
#

Yeah this works for any number of ice bergs

dapper basin
#

if i had like a part and it had a whole bunch of parts with the same name

#

if i put that parts name into a script

#

would it do all of them

gloomy ravine
dapper basin
gloomy ravine
#

It would get one.part

#

Whichever part with that name is found by the script first

dapper basin
#

`if table.find(icebergs, part) then ... end
so i add this instead of local icebergs?

gloomy ravine
dapper basin
#

alr

#

do i change part to my icebergs name

copper birchBOT
#

studio** You are now Level 3! **studio

gloomy ravine
dapper basin
#

hitbox.Touched:Connect(function(part)
if table.find(icebergs, part) then
titanic.Driveing.Drive:Destroy()
wait(5)
titanic:Destroy()
end
end)
so this would work

dapper basin
#

alr i will try it

gloomy ravine
#

Assuming you still have your variables up top

dapper basin
#

yup

#

one last thing, do i change icebergs to my folders name

dapper basin
#

alr

#

can i keep the meshes at the same name or do i change them

gloomy ravine
#

Nope keep everythiny

dapper basin
#

alr i will name them in numbers

dapper basin
#

it doesnt work

gloomy ravine
#

Show me the code

dapper basin
gloomy ravine
dapper basin
#

ok wait

gloomy ravine
dapper basin
gloomy ravine
dapper basin
#

oh

#

ok ill change all their names to 1

gloomy ravine
#

Names don't matter here

gloomy ravine
dapper basin
gloomy ravine
#

Show me the code tho

dapper basin
#

i put the script in the model, do i need to put it in hitbox?

#

'''lua

#

'''lua local titanic = script.Parent
local hitbox = titanic.Hitbox
local icebergs = game.Workspace.Meshes["Meshes/iceberg - Copy (12)"]

hitbox.Touched:Connect(function(part)
if table.find(icebergs, part) then
titanic.Driveing.Drive:Destroy()
wait(5)
titanic:Destroy()
end
end)
'''

#

wtf

#

wait

#

oh alr ye ok

#

local icebergs = game.Workspace.Meshes["Meshes/iceberg - Copy (12)"] ik its this line

gloomy ravine
dapper basin
#

i fixed it

#

local titanic = script.Parent
local hitbox = titanic.Hitbox
local icebergs = game.Workspace.Meshes:GetChildren()

hitbox.Touched:Connect(function(part)
if table.find(icebergs, part) then
titanic.Driveing.Drive:Destroy()
wait(5)
titanic:Destroy()
end
end)

gloomy ravine
#

There you go

dapper basin
#

and thatll work?

gloomy ravine
#

Should work

dapper basin
#

do i put the script in the hitbox?

gloomy ravine
#

Yep

dapper basin
#

or just in the model

#

alr

gloomy ravine
#

Leave it

#

I was saying yep to it working

#

@dapper basin

dapper basin
#

ok

#

ice 1 worked

#

it works, thank you so much