Hey there!
I’m trying to make a tween that shrinks the HumanoidRootPart (I have a custom character which is pretty much just the HumanoidRootPart so the rootpart handles all collisions). For whatever reason, the script returns “TweenService:Create failed because Instance is null” - this instance being the HumanoidRootPart.
Here’s the script (only what I think is relevant to this, all the stuff later and in between these lines of code is probably irrelevant):
local player = game:GetService("Players").LocalPlayer
player.CharacterAdded:Connect(function(newCharacter)
character = newCharacter
humanoidRootPart = character:WaitForChild("HumanoidRootPart")
humanoid = character:WaitForChild("Humanoid")
end)
local crouch = TweenService:Create(humanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0), {CFrame = CFrame.new(2.5, 3.6, 1)})
I’m unsure what the issue here is, this all seems correct to me but I probably have missed something. Defining the HumanoidRootPart this way seems to work in other parts of the script too.