Basically, I have a brick, that when clicked, another part moves. Here's the code:
local p = script.Parent
local db = false
function move(hit)
local human = hit.Parent
local b = game.Workspace.boop
if human then
if not db then
db = true
for i = 0,1,0.1 do
b.CFrame = b.CFrame + Vector3.new(0,i,0)
wait(0.1)
end
db = false
end
end
end
p.ClickDetector.MouseClick:connect(move)
Everything works, but just that it doesn't move 1 stud. It moves like 20 or something. When I put
for i = 0,1,0.1 do
I thought it meant from "0" to "1" going up "0.1" each time. What am I missing here? All help is appreciated!
