You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I’m trying to create a writable paper object that uses buttons with surface GUIS.
- What is the issue? Include screenshots / videos if possible!
I tried to add mouse hover animations by using tween service but I always came across an error:
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I looked on the dev forums but none of the solutions helped me.
-- Set up --
local TweenService = game:GetService("TweenService")
local NoteTable = game.Workspace.Table
local buttons = script.Parent:FindFirstChild("Note Buttons")
-- Functions --
function ButtonTween(Object, Goal, Speed, Style, Direction)
local TI = TweenInfo.new(Speed,Style,Direction, 0)
local Goal = {CFrame = Goal}
local Animation = TweenService:Create(Object, TI, {Goal})
Animation:Play()
end
-- Code --
for a, b in pairs(NoteTable.Buttons:GetChildren()) do
for i, v in pairs(buttons:GetChildren()) do
local cFrame = b.CFrame;
v.TextButton.MouseEnter:Connect(function(X, Y)
ButtonTween(b, cFrame * CFrame.new(-0.1, 0, 0), 0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out);
end)
v.TextButton.MouseLeave:Connect(function(X, Y)
Do(b, cFrame * CFrame.new(0, 0, 0), 0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out);
end)
end;
end
Note: Please let me know if you need any other information!


