Recently, I have been trying to make a crate system and for the opening of the crate, I need to make it so the crate goes from right to left with its rotation. If you need an example of the crate opening system I am trying to make, Pet Simulator is a good place to look if you can't understand where I am coming from here.
This is the script I have got and it works fine for the first part with going right.
local TweenService = game:GetService"TweenService"
local tween = TweenService:Create(
script.Parent,
TweenInfo.new(1),
{
Rotation = 20
}
)
tween:Play()
But then I need it to go to -20 after that and then repeat, which I'm guessing could be used with a
whilst true do
end
command. If possible, I'm also trying to make it make it speed up the rotation over time, so once it is activated, which I can make do with a mouse click function, it will start to shake with the script whilst getting faster and bigger until then hiding.
Thanks!
