I am having problems with moving a player that touches a brick to somewhere else. I have tried putting 'FindFirstChild("Humanoid")' as a variable and as a part of the 'onTouched' function, but niether have worked.
This is the code I have currently.
The script is a child of Part 'Part3'.
bin = script.Parent
player = game.Players:FindFirstChild("Humanoid")
function onTouched(Part3)
if player then
player.Torso.CFrame = CFrame.new(Vector3.new(84, 160, 12))
end
end
bin.Touched:connect(onTouched)
I am a newbie to scripting, so I appreciate if you would explain the changes you would make to this code. Thank you in advance.

2 comments
It works! Thank you!
No problem, glad I could help.