Event that should be firing on a loop only fires once

Hi!

I’m trying to create a Telekinesis System in which the player can hold an object, and it works!..Somewhat. Essentially, I can click the object and begin to hold it, then it suddenly stops. This is tied to the event, it may be that it’s not firing or that I’m over firing it or something. Please help!

game.ReplicatedStorage.Events.Telekinesis.OnServerEvent:Connect(function(Player, part, ray)
	wait(0.01)
	game:GetService("TweenService"):Create(part, TweenInfo.new(0.5), {Position = ray.Origin + ray.Direction * 15}):Play()
	part.CanCollide = false
end)

connection = game:GetService("RunService").RenderStepped:Connect(function()
	game.ReplicatedStorage.Events.Telekinesis:FireServer(part, ray) -- ray is a variable and so is the part. the server recognizes these two just fine. it is not the problem
end)

You can use this.
It is a recursion between server and client so it won’t fire remote too fast.

Rem.OnServerEvent:Connect(function()
    -- do your smth here
    Rem:FireClient()
end)

And then on client side

Rem.OnClientEvent:Connect(function()
    if holding == true then
        Rem:FireServer()
    end
end)