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)