So I have model that I'm trying to tween but I can't seem to get it working. I tried looping through the model and doing local example = game.Workspace.example.PrimaryPart but that didn't work either. I'm at a lost for what to do right now so help is appreciated.
local on = false
local TweenService = game:GetService("TweenService")
local TweeningInformation = TweenInfo.new(
8,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
0,
false,
0
)
local goUp = {CFrame = CFrame.new(-217.408, 2.934, 12.847)}
local goDown = {CFrame = CFrame.new(-217.408, -31.094, 12.847)}
script.Parent.ClickDetector.MouseClick:Connect(function()
if on == false then
for _,v in pairs(game.Workspace.Present:GetChildren()()) do
local tweenUp = TweenService:Create(v,TweeningInformation,goUp)
tweenUp:Play()
end
on = true
else
for _,v in pairs(game.Workspace.Present:GetChildren()) do
local tweenDown = TweenService:Create(v,TweeningInformation,goDown)
tweenDown:Play()
end
on = false
end
end)

1 comment
How do I change the orientation(rotation) though?