local part = script.Parent
local start = game.Workspace.StartMiniGame
local repStorage = game:GetService("ReplicatedStorage")
local event = repStorage.StartMiniGame
event.OnServerEvent:Connect(function()
while wait() do
for I = 1,50 do
print(I)
wait(0.1)
if I > 0 and I < 25 then
part.CFrame = part.CFrame+Vector3.new(0,0.1,0)
end
if I >= 25 then
part.CFrame = part.CFrame+Vector3.new(0,-0.1,0)
end
end
end
end)
COMMUNITY QUESTION
Why does my code make my brick go more down then up???
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
your for loop loops for an odd number of times, dividing it by two and rounding to a whole number will give you unequal pieces
@GoldAngelinDisguise.. What?
nvm i was stupid, you just have to change the conditions to I <= 25 and I >= 26