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

Detect if a player touches a mesh, rather than the part itself?

I'm making a tool, It uses a part, which is very small, and a special mesh which grows. When the Mesh touches the player, it will kill them. If anyone knows how to detect if a player touches a mesh itself, and not the part, and could help me I'd appreciate it.

1 answer

script.Parent.Touched:connect(function(hit)
	local hum = hit.Parent:FindFirstChild("Humanoid")
	if hum then
	hum.Health = hum.Health - hum.MaxHealth
	script.Parent.MeshName.Size = script.Parent.MeshName.Size + Vector3.new(x,y,z)
	end
end)

It's impossible, as far as I know, to tell if someone touches a mesh. You could make the parts size equal the mesh's size? Other than that I'm thinking you're out of luck. Like I said, make the parts size == mesh's size

--Put this in another script inside the handle
while wait() do
	script.Parent.Size = Mesh'sLocation.Size
end

1 comment

0

Can't do that, I forgot to mention that the part is welded, changing the size will break the weld.

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