i’m trying to tween the canvas position with an script i’m trying to achieve like the rool system of csgo that will start rolling until it stops on what item you won but for new i just know how i’m suppose to tween this canvas position.
1 Like
Your code should look like this
local Tween = TweenService:Create(script.Parent, Info, {CanvasPosition = goal})
Tween:Play()
--[[ Parameters are
#1 - The Instance of the property (or properties) you're tweening
#2 - The TweenInfo object
#3 - A dictionary of the property's name and new value (for example: {Transparency = 1})
]]
your tween info is the second parameter so its (Gui, Info, goal)
oh i got it i make it work the problem is was the goal was not an dictionary but it’s all working new
game:GetService("TweenService"):Create(script.Parent,, TweenInfo.new(5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out, 0, false, 0), {CanvasPosition = UDim2.fromScale(15293, 10)}):Play()
In-depth explanation:
[ @HugeCoolboy2007 ]
Your code should look like this
local Tween = TweenService:Create(script.Parent, Info, {CanvasPosition = goal})
Tween:Play()
--[[ Parameters are
#1 - The Instance of the property (or properties) you're tweening
#2 - The TweenInfo object
#3 - A dictionary of the property's name and new value (for example: {Transparency = 1})
]]