#I dont know why it doesnt work
60 messages · Page 1 of 1 (latest)
u made the tween info wrong
ur supposed to use
TweenInfo.new()
oh
i have anther issue
what is it
I have a code
like this
local TweenService = game:GetService("TweenService")
local frame = game.Workspace.RustyOven.Door:WaitForChild("Frame")
local tweenInfo = TweenInfo.new(2)
local goal = {
Position = Vector3.new(5,5,5)
}
print("jc")```
i used a print statement to debug
u need to use Udim
oh wait mb
whenever i add that local goal, the print doesnt work
do u get any errors?
does it work when u remove the goal variable
Now it works for some reason?
weird
local tween = TweenService:Create(frame, tweenInfo, goal)
when i add that it doesnt work
and ofc when i try to play the animation it doesnt work
weird since I copied your script and it works fine for me
do u get any errors after playing the tween?
nope
i asked chatgpt cuz its ananoying me and he gave me this
local TweenService = game:GetService("TweenService")
local frame = game.Workspace.RustyOven.Door:WaitForChild("Frame") -- Assuming 'Frame' is a part.
-- TweenInfo (2 seconds duration)
local tweenInfo = TweenInfo.new(2)
-- Correct 'CFrame' for physical objects
local goal = {
CFrame = CFrame.new(5, 8, 8) -- Target position in world space
}
-- Create and play the tween
local tween = TweenService:Create(frame, tweenInfo, goal)
tween:Play()
print("Tween started successfully!")```
does it work?
yes
it uses CFrame
idk whats the diff between cframe and vector3
** You are now Level 3! **
CFrame is like a diffrent way of positioning objects
cool that it works but no idea why it didnt work with Position
roblox moment
why?
because u cant position models using Position, u need to use CFrame for models
u need
to use
CFrame to change the rotation as well
u gotta do something like this
CFrame = CFrame.new() * CFrame.Angles
local TweenService = game:GetService("TweenService")
local ovenDoor = script.Parent.Parent.Parent.Parent:WaitForChild("Door")
local twinInfo = TweenInfo.new(1, Enum.EasingStyle.Sine)
local goal = {
CFrame = CFrame.new(5, 20, 7)
}
local tween = TweenService:Create(ovenDoor, twinInfo, goal)
tween:Play()```
ovenDoor is a model of a mesh and a glass part, why isnt it working?
i see
also when ur using CFrame.Angles u should use math.rad()
ye