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

how do you mention the player hitting a part ?

I don't have a script. because i wouldn't have asked this question if i knew how to mention it.

1 answer

✓ Accepted answer

Here's the code I whipped up:

script.Parent.Touched:Connect(function(touched) --touched is the bodypart that the player touched the part from

if touched.Parent:FindFirstChild('Humanoid') then --if the thing that touched is a character then
	local player = game.Players:GetPlayerFromCharacter(touched.Parent) --get the player from the character
	--do whatever with the player from here
end

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