R15 character scaling breaks when being tweened by the server

I am attempting to smoothly scale characters with R15 character scaling by using the TweenService on the NumberValues under humanoid. It works in studio, but in the client it causes characters to die and fly around. It seems to happen every time.

I’ve worked out that it’s likely due to the humanoid being handled on the client. And me tweening the character scale on the server.

I tried it without TweenService in a wait loop and I experienced the same issue. I’ve also attempted to move tweening to the client but that is causing another issue. The character seems to scale, however the visual of the character remains it’s original size.

Example place: https://www.roblox.com/games/954094809/R15-Scaling-with-TweenService-Bug-Demo
(See scripts under ServerScriptService and StarterCharacterScripts)

In studio, the expected result with scaling happening on the server: https://youtu.be/lp5TosycBdo
In the client with scaling happening on the server: https://youtu.be/VllPvVWt_H4
In the client with scaling happening on the client: https://youtu.be/C_V8K5YZ2eM

Code to reproduce the issue:

local tweenService = game:GetService('TweenService')

game.Players.PlayerAdded:Connect(function (player)
	player.CharacterAdded:Connect(function (character)
		local humanoid = character:WaitForChild('Humanoid')
	
		local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out, 0, false, 4)
		local scalePropertyGoals = { Value = 16; }

		tweenService:Create(humanoid.BodyDepthScale,  tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.BodyWidthScale,  tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.BodyHeightScale, tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.HeadScale,       tweenInfo, scalePropertyGoals):Play()
	end)
end)
6 Likes

I wouldn’t advise doing interpolations on the server. It’s unhealthy for replication. Assuming you are using filtering enabled, I would instead maybe have some sort of interpolation remote event that tells all clients to interpolate those values locally.

3 Likes

I have just enabled a change to the character scaling code and I think this issue should be resolved. Let me know if you still see the problem.

4 Likes

It seems to have fixed every issue I mentioned in this post. Thank you!

1 Like

Happens 100% of the time

I’m trying to tween a player’s character size on the server. However while the tween is playing, all of player’s movements don’t seem to get replicated to other clients anymore. This is even weirder due to the fact that the server sees their movements just fine. Animations still replicate as well.

https://streamable.com/gt0et

In the video, I set and play the tween as soon as the players load. The baseplate turning green denotes the end of the tween, and that’s also when the characters seem to rubberband back into place from other clients’ point of view. I was able to repro this using this script alone in an empty baseplate.

below is a repro file
bug.rbxl (18.7 KB)

local tweenService = game:GetService("TweenService")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		--allow them to load in
		wait(5)
		local humanoid = character:WaitForChild("Humanoid")
		local tweenTime = 60
	
		local tweenInfo = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
		local scalePropertyGoals = {Value = 5}

		tweenService:Create(humanoid.BodyDepthScale, tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.BodyWidthScale, tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.BodyHeightScale, tweenInfo, scalePropertyGoals):Play()
		tweenService:Create(humanoid.HeadScale, tweenInfo, scalePropertyGoals):Play()
		
		delay(tweenTime, function()
			workspace.Baseplate.BrickColor = BrickColor.new("Bright green")
		end)
	end)
end)

This is weird because it seems this topic was addressed back in 2017. What changed to break this again?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.