I am trying to make a script that will elevate a model using TweenService.
Error: ServerScriptService.Script:11: attempt to call a CFrame value
Script:
local endCFrame = CFrame.new(-708.97, 47.097, 58.504)
local TweenService = game:GetService("TweenService")
local model = workspace.StageEssentials.StageLift
local modelroot = model.PrimaryPart
local twenInfo = TweenInfo.new(5)
local tween = TweenService:Create(modelroot, TweenInfo, {CFrame = modelroot.CFrame(endCFrame)})
wait(50)
tween:Play()
local endCFrame = CFrame.new(-708.97, 47.097, 58.504)
local TweenService = game:GetService("TweenService")
local model = workspace.StageEssentials.StageLift
local modelroot = model.PrimaryPart
local twenInfo = TweenInfo.new(5)
local tween = TweenService:Create(modelroot, TweenInfo, {CFrame = endCFrame})
wait(50)
tween:Play()
local endCFrame = CFrame.new(-708.97, 47.097, 58.504)
local TweenService = game:GetService("TweenService")
local model = workspace.StageEssentials.StageLift
local modelroot = model.PrimaryPart
local twenInfo = TweenInfo.new(5)
local tween = TweenService:Create(modelroot, twenInfo , {CFrame = endCFrame})
wait(50)
tween:Play()
Would this work to quickly weld everything if I put it in the command bar?
local model = workspace.StageEssentials.StageLift
local ppart = model.PrimaryPart
for i, v in pairs(model:GetChildren()) do
if v:IsA("BasePart") and (v ~= ppart) then
local weld = Instance.new("WeldConstraint", v)
weld.Part0 = v
weld.Part1 = ppart
end
end
My mistake, I didn’t. However, I just tested and it did work although the parts are all in incorrect places and some of them don’t even appear to be visible (Hidden in the primary part). Is there anyway to fix this?
It has the easy weld button, it might fix your welding problems so click on it and select parts then click the primarypart first then the rest of the parts, then click join in place and make sure that animateble is off