Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i make a moving part when you touch it?

Asked by 6 years ago

script.Parent.Position = script.Parent.Position + Vector3.new(0, 0, 0) i have this script but it guides the part nowhere lol t just goes to a random location every time

2 answers

Log in to vote
0
Answered by 6 years ago
CFrame.new(script.parent).Position + Vector3.new(0,0,0) --Can you use it?
0
It doesn't go back rascist_paperz -45 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
script.Parent.Touched:connect(function(what)
local Humanoid = what.Parent:FindFirstChild("Humanoid")

if Humanoid then
script.Parent.Position = script.Parent.Position + Vector3.new(1,0,0)
end

end)
0
I tested it my self and it works :) NepalClamps 13 — 6y

Answer this question