Can TweenService work in a LocalScript?

Can TweenService work in a LocalScript?

Tweenservice can work on a localscript.

2 Likes

Alright thank you:)

[30letters]

TweenService is open to all BaseScripts

In localscripts, Tweenservice is mainly used for tweening GUI

Example:

local gui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
gui.Name = "RandomGUI"
gui.ResetOnSpawn = false
gui.IgnoreGuiInset = true
local frame = Instance.new("Frame", gui)
frame.Size = Udim2.new(0, 50, 0, 50)
while wait(5) do
game:GetService("TweenService"):Create(frame, TweenInfo.new(1, Enum.EasingStyle.Quint), {Position = Udim2.new(0, math.random(0, 100), 0, math.random(0, 100))}):Play()
end
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.