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)

4 comments

0

wow thx

0

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"

0

Yeah that's the problem.

0

Change connect and KeyDown to UIS and Connect to avoid future problems as well