i have a car damage systam, but i want to add a border that goes on your screen (think of the roblox death border), but i don't know how to do it, i can provide code samples if required, any help with this would be greatly appreciated!

deeper explanation: i'm trying to make it so that once a part gets broken off (reaches 0 health) a gui gets sent to the person who's occupying the driveseat, sort of like the roblox damage gui thing that shows up for a bit, and then fades away, the thing i want is that the gui appears the very moment the part breaks off, so any answers that give that solution are appreciated

the code for the script i'm using

function crashed(hit)
	if script.Parent.Velocity.Magnitude > hit.Velocity.Magnitude + 45 and hit.CanCollide == true or hit.Velocity.Magnitude > script.Parent.Velocity.Magnitude + 35 then
		script.Disabled = true
		script.Parent.Health.Value = script.Parent.Health.Value - script.Parent.Velocity.Magnitude / 1.25
		wait()
			if script.Parent.Health.Value > 0 then
		script.Parent.Sparks.Enabled = true
		local sound = math.random(1, 2)
		if sound == 1 then
			script.Parent.Collide.SoundId = "rbxassetid://490314550"
		end
		if sound == 2 then
			script.Parent.Collide.SoundId = "rbxassetid://215550851"
		end
		script.Parent.Collide.Playing = true
		wait(0.5)
		script.Parent.Sparks.Enabled = false
		wait()
		script.Disabled = false
			else
				local driver = script.Parent.Parent.Parent.Parent.Parent.Parent.DriveSeat.Occupant.Parent
				script.Disabled = true
				script.Parent:BreakJoints()
				script.Parent.CanCollide = false
				script.Parent.Break.Playing = true
				script.Parent.Parent.Parent.Parent.Parent.Parent.Body.hoodlimit.CanCollide = true
				script.Parent.Parent = workspace
				wait(60)
				script.Parent:remove()
			
				
			
	end
	end
	end
script.Parent.Touched:connect(crashed)

1 comment

0

A Code sample would definitely help! I just need more information on how I can Help you because I don't understand your description too much.