How was this animated knife skin created?

I’m talking about this below:

I know this can be done using texture offsets, but how did they make it not affect the handle?

(Yes this is breaking point.)

4 Likes

Same way it’s done here:

I open-sourced it here:

The code is messy cause it was done rather quick for the texture but you can find in:

StarterPlayerScripts > LocalScript > Lines 249 to 258

local c = 0
local c2 = 0
local i = .005
local i2 = .001
while rs.RenderStepped:wait() do
	for i,v in pairs (full.MeshPart:GetChildren()) do
		if v:IsA("Texture") then
			v.OffsetStudsU = c
			v.OffsetStudsV = c2
		end
	end
	c = c + i
	c2 = c2 + i2
end

https://gyazo.com/455649c7f6725ae4f13d3248849fecde

1 Like

Maybe its not 1 full part. So thats why i’m pretty sure.

Thanks, if I wanted to exclude part of the model would I just separate them and then weld it?

Exactly, just keep it as an separated part, weld it to the model and don’t offset its texture.

1 Like

Thank you for your resource, but your game is broken.

If you tried to republish, the game won’t work without the animations. You don’t need the animations for the texture offsets.

Just make it separate parts.

1 Like