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

How to change property of item once hit?

I'm trying to create an upgrader which smooths the surface of an object as it passes through, however, it seems to hate me.

`game.Workspace.aUpgrader1.Upgrade4.Touched:connect(function(hit) if hit:FindFirstChild("Part","Test") then hit.TopSurface="Smooth"

end

end)`

1 comment

0

If player touch part or part touch part?

1 answer

If you're looking to smooth the surface of the part passing through then FindFirstChild is meaningless.

game.Workspace.aUpgrader1.Upgrade4.Touched:connect(function(hit) --Hit IS the part that's touching the upgrade
	hit.TopSurface = "Smooth"
end)

1 comment

0

Ah, thanks for that! How do I add a line that makes it change the surface of a block that has a certain name?

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