Oh for this, in my old scripts, {Rotation = x} worked just fine. Also, no error is appearing in the output.
Worth a shot, at least try before saying “it worked before.”
Indeed, it’s the script not working for you…
@moochezz and @JakeTheHero89 , I figured out the problem. Looks like it wasn’t rotating due to me having the image button in a frame with a UI grid layout. This is completely my bad, sorry!
Oh, also remember to include a screenshot of the child and parent layout
My english died…
basically make a screen of the button and its parent I guess
it was fun helping you, hope it was the same for you
Yes, looks like it was in a UI grid layout, and that was preventing it from rotating.
Definitely, thank you so much!
No problem
A_quisition
local tweenInfo = TweenInfo.new(0.8, Enum.EasingStyle.Linear,Enum.EasingDirection.Out, 0, true)
script.Parent.MouseEnter:Connect(function(x, y)
print("Entered")
local tween = ts:Create(
script.Parent,
tweenInfo,
{Rotation = -40}
)
tween:Play()
end)
script.Parent.MouseLeave:Connect(function(x, y)
print("Left")
local tween2 = ts:Create(
script.Parent,
tweenInfo,
{Rotation = 0}
)
tween:Play()
end)
Maybe this will work?
Mark this as solution to show that this post has been resolved and so others can see mistakes that they could’ve made.
Edit: I didn’t mean to sound rude sorry
Sorry, but I just figured out the problem. It wasn’t a problem in the script, but it turns out the button was in a UI grid layout, which is why the prints show up but it didn’t actually rotate. Thanks anyways!
No problem! I’m happy that you’ve figured the problem out!
Oh, sure, I’ll do that. Thanks!