I have a script that tweens a mesh (big cat aka bert) however I get an error "GetPrimaryPartCFrame is not a valid member of MeshPart "ReplicatedStorage.bigcat", is there any way I could solve this? How do you tween a mesh? (Yes I know Message is deprecated I only put it there as a placeholder)

local RStorage = game:GetService("ReplicatedStorage")

local SummonBert = RStorage:WaitForChild("SummonBert",math.huge)

local bert = RStorage:FindFirstChild("bigcat")

local tweenService = game:GetService("TweenService")

local Destination = workspace.Destination

local function tweenModel(model, CF)
	local info = TweenInfo.new()
	local CFrameValue = Instance.new("CFrameValue")
	CFrameValue.Value = model:GetPrimaryPartCFrame()

	CFrameValue:GetPropertyChangedSignal("Value"):Connect(function()
		model:SetPrimaryPartCFrame(CFrameValue.Value)
	end)

	local tween = tweenService:Create(CFrameValue, info, {Value = CF})
	tween:Play()

	tween.Completed:Connect(function()
		CFrameValue:Destroy()
		for i,v in pairs(game:GetService("Players"):GetPlayers()) do
			wait(3)
			v:Kick("Nothing remains in this world")
		end
	end)
end

SummonBert.OnServerEvent:Connect(function(player)
	bert:Clone().Parent = workspace
	print("Bert has entered workspace")
	wait(3)
	local msg = Instance.new("Message",workspace)
	msg.Text = "Bert has been summoned, the world is doomed"
	msg:Destroy()
	tweenModel(bert,Destination)
	
	print("OUR LORD AND SAVIOR, BERT HAS BEEN SUMMONED, ALL HAIL BERT")
end)

5 comments

0

local bert = RStorage:FindFirstChild("bigcat") is bigcat a meshpart or model

0

tween it like a part, not a model

0

@BulletproofVast its a mesh

0

@greatneil80 kk, il try that!

0

You cant get primarypartcframe of a mesh cos primary part is only on models i think. just do bert.CFrame not bert:Getprimarypartcframe