i want the part to go up when i touch it. pls halp
✓ ANSWER ACCEPTED
how do i make a part go up when touched?
1 answer
✓ Accepted answer
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild"Humanoid then--sees if a player touched it
part.Position = part.Position + Vector3.new(0,[enter amount of studs it goes up],0)
end
end)
4 comments
0
An NPC could still activate this with this script though.
0
Wow okay this answer is so basic but I guess this guy doesn't want anything better.
0
Stop discriminating the guy, it takes time and effort into writing an answer. I personally think it's amazingly written.
0
i know this was months ago but if you dont want an npc touching it and activating it then just add a named value inside starterplayer scripts and then add a line in this code that checks if the chaarcter has that value inside that only players would have, and then npcs wont activate it unless they were purposfully given the same value.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
do part.Touched