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

Does Roblox not allow surface change "Effects" to happen? (Read for info)

I have a script in a vehicle that will make a part that it hits become all SmoothNoOutlines instead of weld, yet it doesn't detaches itself. It's welded with the Weld surface, not a Weld script! Here's my script:

sp = script.Parent
Parts = {"Part","Wedge","Truss","Brick","part","CornerWedge"}

for i,v in pairs(Parts) do
	sp.Touched:connect(function(Hit)
		if Hit.Name == v then
			wait()
			Hit.BackSurface = "SmoothNoOutlines"
			wait()
			Hit.BottomSurface = "SmoothNoOutlines"
			wait()
			Hit.FrontSurface = "SmoothNoOutlines"
			wait()
			Hit.LeftSurface = "SmoothNoOutlines"
			wait()
			Hit.RightSurface = "SmoothNoOutlines"
			wait()
			Hit.TopSurface = "SmoothNoOutlines"
		else
			print("Condition is Not Met")
		end
	end)
end

I was thinking that I might need to do something like using CFrame and add a very small amount to make it detach itself instead. Would that be better then using SmoothNoOutlines?

1 answer

✓ Accepted answer

Try just using Hit:BreakJoints() instead of setting the surfaces. This will break the connection it has with other parts and fall off without changing the surfaces.

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