local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local toggle = false
mouse.KeyDown:connect(function(key)
if not toggle and key == "r" then
local i = Instance.new("Part",workspace)
i.Shape = "Ball"
i.Size = Vector3.new(1.05, 1.05, 1.05)
i.Material ="Neon"
i.BrickColor = BrickColor.Black()
for i =0,1,0.01 do
wait()
i.CFrame = i.CFrame:lerp(player.Character.Head.CFrame,i)
end
end
end)
COMMUNITY QUESTION
idk how to fix this error attempt to index local 'i' (a number value) how do i fix?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
wow thx
You're likely getting a name conflict. Use a different name for "local i" or the "i" in the "for i =0,1,0.01 do"
Yeah that's the problem.
Change connect and KeyDown to UIS and Connect to avoid future problems as well