Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to destroy a model when touches a block / terrain?

Asked by
Uroxus 350 Moderation Voter
9 years ago

I'm making a ship game, trying to make it realistic as possible. I'm trying to make a script that when the player either crashes into the land (Which is the terrain) or a building (Probably a bridge) then the BodyForce instance thats in the ships hull (Instance that makes the boat float because it dosent on its own) will be reduced to 13000.

I've attempted to do this below, But thought that the water (Im using roblox water for this game) is also considered part of the terrain, therefore wouldnt work. If anyone could give me a tip in the right direction for getting a script that changed the models BodyForce on touch of the Grassy Terrain or a block then that would be much appreciated! Thank you in advance! =)

I'd like to point out this current script is a normal script placed in 'Terrain'


Model = game.Workspace.Boat function touch(Terrain) game.Workspace.Boat.Union.BodyForce = 13000 end game.Workspace.Terrain.Touched:connect(touch)

Answer this question