Tweening unanchored model (tool)

  1. What is the issue?
    i have an tool with 2 models (1 is base of it and 2 is the model i want to move)
    if I try tweening 2nd model with tweenservice then it won’t work because of welds between model 1 and model 2 and if i dont do that welds then tool will fall apart (as i know)
    tabletexplorer1

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i tried looking on developer hub but i couldn’t find the answer.

here is tablet:

default:
tablet2

Extended:
tablet3

if you need more information ask me
Script:

TS = game:GetService("TweenService")



script.Parent.Extend:GetPropertyChangedSignal("Value"):Connect(function()
	local CF = Instance.new("CFrameValue", script)
	CF.Value = script.Parent.ExtendedScreen:GetPrimaryPartCFrame()

	local Info = TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)

	CF:GetPropertyChangedSignal("Value"):Connect(function()
		script.Parent.ExtendedScreen:SetPrimaryPartCFrame(CF.Value)
	end)

	if script.Parent.Extend.Value == true then
		Tween = TS:Create(CF, Info, {Value = script.Parent.Pos.To.CFrame})
		script.Extend:Play()
	else
		Tween = TS:Create(CF, Info, {Value = script.Parent.Pos.Default.CFrame})
		script.Extend:Play()
	end

	Tween:Play()
	Tween.Completed:Connect(function()
		CF:Destroy()
	end)
end)

Weld the two tablet parts seperately. Use a motor6D to connect a tablet part to the main tablet part and then tween that motor6D

do i have to motor6D primary part?

nope, motor6D are for unanchored parts like your character limbs use motor6D

if you don’t understand, I can make a demo file

sure, I’m just not really good at motor6D’s

no problem, I am gonna make it

Extendable Tablet Tool with Motor6D.rbxl (88.5 KB)
here is the demo file, the tablet tool is inside the StarterPack

You can also check out the script inside the tool

The tablet will extend or close back when you click

thank you. i will mark your first message as solution.

Thanks! Also I recommend this plugin https://create.roblox.com/store/asset/1274343708
It can help you make welds or joints (motor6Ds)

1 Like

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