#How would i tween a part that gets parented to the workspace?

1 messages · Page 1 of 1 (latest)

winter flame
#

I want to tween a clone of a part but how would i tween it being added to the workspace?

rough summit
#

do you want to parent the clone to the workspace?
just do

  local clone = whatever:Clone()
  clone.Parent = workspace

(syntax may be wrong)
or are you asking for a fade in effect?

winter flame
rough summit
# winter flame sorry for responding late but yeah i want a fade in effect
  1. define tween service
local ts = game:GetService("TweenService")
  1. define the settings/info of the animation, i.e. time, easing style
local tweeninfo = TweenInfo.new(time, style, direction, etc)
  1. create the tween
ts:Create(part_name, tweeninfo, {Transparency = Transparency - 0.1})

ts:Play()

make sure to set the part transparency to 1 in the properties menu
here's some documentation:
https://create.roblox.com/docs/reference/engine/classes/Tween
https://create.roblox.com/docs/reference/engine/enums/EasingStyle

a look at the easing styles available:
https://devforum.roblox.com/t/only-some-easingstyles-and-easingdirections-are-displayed/377160

The Class.Tween object controls the playback of an interpolation.

Enum used with Datatype.TweenInfo|TweenInfo.new to control the motion of a
Class.Tween.