Hello, I have a Touched function from the server side seeing what the player has Touched. It does work and print's out the exact part what its touching but for my application i have a player and the touched function should return with the players name ( respectively the parent of the part i shall say).
chilli.Touched:Connect(debounce(function(response) if buttonPressed == true then print(response) -- some code here to find the player name from touching the player's part buttonPressed = false end end))
From the GIF above it should return with the parents name.In my Case its 'Bob'
thanks,
However,replacing the print command with (response.Parent.Name) will sometimes print the name but the chances are slim
the Hit
parameter only gives you the specific part that touched, to get the thing it's inside of you can use .Parent
.
chilli.Touched:Connect(function(Hit) if buttonPressed == true and Hit.Parent:FindFirstChild("Humanoid") then print(Hit.Parent.Name) end end)