The animation looks fine on the local end, but on the server side it encounters a weird problem

You can write your topic however you want, but you need to answer these questions:

  1. Hi, I wanna fix this bug where on the server-side the part I’m rotating using CFrames acts weirdly, on the local end it does what I intend for it to do so IDK why this is happening on the server side.

This is my code that rotates the part, BTW:

function Attack()
	if died==false then
	local player = LocatePlayer()
	if player~= nil and loaded==true and died==false then
		local chr=player.Character
		local hum=chr.Humanoid
		local hrp = chr.HumanoidRootPart
		base.CFrame = CFrame.new(base.Position, (Vector3.new(hrp.Position.X,base.Position.Y,hrp.Position.Z)))
		base.Orientation=Vector3.new(0,base.Orientation.Y,90)
		attackanim:Play()
		wait(.3)
		base.Hit:Play()
		
		if chr:FindFirstChild("LastHitter") then
			if tendrilmodel.Owner.Value~=nil then
				chr.LastHitter.Value = tendrilmodel.Owner.Name
			else
				chr.LastHitter.Value = "Tendril"
			end
		end
		
		hum:TakeDamage(damagePerHit)
	end
	end
end

And a video:

Optimizing the client’s wait time depending on your network buffering is the first thing I want to emphasize by looking at your code. It would be advised to deal with the situation in which there is no basepart. Additionally, using remote events should be taken seriously. This would resolve your problem.

1 Like

I’ll look into it, but IDK how i would use remote events for this as it’s its own entity and the script is a server script but thank u tho