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

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

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

CFrame.new(script.parent).Position + Vector3.new(0,0,0) --Can you use it?

1 comment

0

It doesn't go back

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)

1 comment

0

I tested it my self and it works :)

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