I'm trying to tween a part do a different place & rotation, this is the whole script that I've made:
script.Parent.MouseEnter:Connect(function()
local object = script.Parent
object:TweenSize(UDim2.new(0, 430, 0, 85), nil, nil, 0.1)
end)
script.Parent.MouseLeave:Connect(function()
local object = script.Parent
object:TweenSize(UDim2.new(0, 400, 0, 80), nil, nil, 0.1)
end)
script.Parent.MouseButton1Click:Connect(function()
local object2 = script.Parent
object2:TweenPosition(UDim2.new(0.5, 0, 1.5, 0))
local object3 = script.Parent.Parent.AboutButton
object3:TweenPosition(UDim2.new(0.5, 0, 1.5, 0))
local tweenService = game:GetService("TweenService")
local part = game.Workspace.CameraPart
local tweeningInformation = TweenInfo.new(
5,
Enum.EasingStyle.Quad,
Enum.EasingDirection.In,
0,
false
)
local partProperties = {
Position = Vector3.new(20.7,8,17.14);
Orientation = Vector3.new(0,90,0)
}
local Tween = tweenService:Create(part,tweeningInformation,partProperties)
Tween:Play()
end)
It's a local script, and I've tried using a remote event to do the part tween, but nothing! Can someone help me? The actual code is line 16 downwards.
