basically i have created a multi instance tweening plugin, in which it creates a modulescript as shown BELOW:
WARNING THIS IS GONNA LOOK REALLY WEIRD BUT ILL EXPLAIN IT BELOW
local module = {
[1] = {
["Values"] = {
["{9220cd52-b3ef-42a4-97e6-be51651c9c10}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=11322415498",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -35,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Gun",
["Position"] = UDim2.new(0.8920817375183105, 0, 0.2819216251373291, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{a59b93c7-1bf5-43b1-b7cd-9802d6e8f11a}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=5419949986",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 0, 0, 0),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -90,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Bullet",
["Position"] = UDim2.new(0.8632644414901733, 0, 0.2567155659198761, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{2fdf0b36-b455-4eb2-aa0b-8afb5a47cb24}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=8915667153",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = 0,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Cola",
["Position"] = UDim2.new(0.19093231856822968, 0, 0.2819216251373291, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
},
["TweenInfo"] = {
["EasingStyle"] = Enum.EasingStyle.Linear,
["Time"] = 1,
["EasingDirection"] = Enum.EasingDirection.In,
},
},
[2] = {
["Values"] = {
["{9220cd52-b3ef-42a4-97e6-be51651c9c10}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=11322415498",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -35,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Gun",
["Position"] = UDim2.new(0.8999999761581421, 0, 0.28200000524520874, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{a59b93c7-1bf5-43b1-b7cd-9802d6e8f11a}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=5419949986",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 50, 0, 50),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -90,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Bullet",
["Position"] = UDim2.new(0.8299999833106995, 0, 0.25699999928474426, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{2fdf0b36-b455-4eb2-aa0b-8afb5a47cb24}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=8915667153",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = 0,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Cola",
["Position"] = UDim2.new(0.19093231856822968, 0, 0.2819216251373291, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
},
["TweenInfo"] = {
["EasingStyle"] = Enum.EasingStyle.Linear,
["Time"] = 0.1,
["EasingDirection"] = Enum.EasingDirection.Out,
},
},
[3] = {
["Values"] = {
["{9220cd52-b3ef-42a4-97e6-be51651c9c10}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=11322415498",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = 20,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Gun",
["Position"] = UDim2.new(0.9268198609352112, 0, 0.24660179018974304, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{a59b93c7-1bf5-43b1-b7cd-9802d6e8f11a}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=5419949986",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 50, 0, 50),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -90,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Bullet",
["Position"] = UDim2.new(0.2200000286102295, 0, 0.25699999928474426, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
["{2fdf0b36-b455-4eb2-aa0b-8afb5a47cb24}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Image"] = "http://www.roblox.com/asset/?id=8915667153",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["ImageColor3"] = Color3.new(1, 1, 1),
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["Archivable"] = true,
["Selectable"] = false,
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Active"] = false,
["BackgroundTransparency"] = 1,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = 0,
["ResampleMode"] = Enum.ResamplerMode.Default,
["Name"] = "Cola",
["Position"] = UDim2.new(0.19093231856822968, 0, 0.2819216251373291, 0),
["SliceScale"] = 1,
["ImageTransparency"] = 0,
["SelectionGroup"] = false,
["Visible"] = true,
},
},
["TweenInfo"] = {
["EasingStyle"] = Enum.EasingStyle.Linear,
["Time"] = 0.2,
["EasingDirection"] = Enum.EasingDirection.In,
},
},
[4] = {
["Values"] = {
["{9220cd52-b3ef-42a4-97e6-be51651c9c10}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["SliceCenter"] = nil --[[ Unsupported Value Type: Rect ]],
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Visible"] = true,
["AnchorPoint"] = nil --[[ Unsupported Value Type: Vector2 ]],
["Image"] = "http://www.roblox.com/asset/?id=11322415498",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["ImageRectSize"] = nil --[[ Unsupported Value Type: Vector2 ]],
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["SliceScale"] = 1,
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["ImageColor3"] = Color3.new(1, 1, 1),
["ImageTransparency"] = 0,
["Selectable"] = false,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Name"] = "Gun",
["Active"] = false,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = 20,
["ResampleMode"] = Enum.ResamplerMode.Default,
["BackgroundTransparency"] = 1,
["Position"] = UDim2.new(0.9268198609352112, 0, 0.24660179018974304, 0),
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["Archivable"] = true,
["SelectionGroup"] = false,
["ImageRectOffset"] = nil --[[ Unsupported Value Type: Vector2 ]],
},
["{2fdf0b36-b455-4eb2-aa0b-8afb5a47cb24}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["SliceCenter"] = nil --[[ Unsupported Value Type: Rect ]],
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Visible"] = true,
["AnchorPoint"] = nil --[[ Unsupported Value Type: Vector2 ]],
["Image"] = "http://www.roblox.com/asset/?id=8915667153",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["ImageRectSize"] = nil --[[ Unsupported Value Type: Vector2 ]],
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["SliceScale"] = 1,
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 100, 0, 100),
["ImageColor3"] = Color3.new(1, 1, 1),
["ImageTransparency"] = 0,
["Selectable"] = false,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Name"] = "Cola",
["Active"] = false,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -30,
["ResampleMode"] = Enum.ResamplerMode.Default,
["BackgroundTransparency"] = 1,
["Position"] = UDim2.new(0.17879949510097504, 0, 0.2819216251373291, 0),
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["Archivable"] = true,
["SelectionGroup"] = false,
["ImageRectOffset"] = nil --[[ Unsupported Value Type: Vector2 ]],
},
["{a59b93c7-1bf5-43b1-b7cd-9802d6e8f11a}"] = {
["LayoutOrder"] = 0,
["SelectionBehaviorLeft"] = Enum.SelectionBehavior.Escape,
["Interactable"] = true,
["SizeConstraint"] = Enum.SizeConstraint.RelativeXY,
["ZIndex"] = 1,
["BorderSizePixel"] = 0,
["SliceCenter"] = nil --[[ Unsupported Value Type: Rect ]],
["Draggable"] = false,
["ScaleType"] = Enum.ScaleType.Stretch,
["AutoLocalize"] = true,
["SelectionOrder"] = 0,
["BackgroundColor3"] = Color3.new(1, 1, 1),
["BorderMode"] = Enum.BorderMode.Outline,
["Parent"] = "cant store objects",
["Visible"] = true,
["AnchorPoint"] = nil --[[ Unsupported Value Type: Vector2 ]],
["Image"] = "http://www.roblox.com/asset/?id=5419949986",
["TileSize"] = UDim2.new(1, 0, 1, 0),
["ImageRectSize"] = nil --[[ Unsupported Value Type: Vector2 ]],
["SelectionBehaviorDown"] = Enum.SelectionBehavior.Escape,
["SliceScale"] = 1,
["AutomaticSize"] = Enum.AutomaticSize.None,
["Size"] = UDim2.new(0, 0, 0, 0),
["ImageColor3"] = Color3.new(1, 1, 1),
["ImageTransparency"] = 0,
["Selectable"] = false,
["ClipsDescendants"] = false,
["BorderColor3"] = Color3.new(0, 0, 0),
["Name"] = "Bullet",
["Active"] = false,
["SelectionBehaviorUp"] = Enum.SelectionBehavior.Escape,
["Rotation"] = -90,
["ResampleMode"] = Enum.ResamplerMode.Default,
["BackgroundTransparency"] = 1,
["Position"] = UDim2.new(0.19999998807907104, 0, 0.25699999928474426, 0),
["SelectionBehaviorRight"] = Enum.SelectionBehavior.Escape,
["Archivable"] = true,
["SelectionGroup"] = false,
["ImageRectOffset"] = nil --[[ Unsupported Value Type: Vector2 ]],
},
},
["TweenInfo"] = {
["EasingStyle"] = Enum.EasingStyle.Linear,
["Time"] = 1,
["EasingDirection"] = Enum.EasingDirection.In,
},
},
}
return module
basically each number (1, 2, 3, 4) are all points in the “animation” in those numbers are a Value table in which there are long strings, those are tags that are applied to certain instances i am tweening/animating and obviously it brings you to all of the values in it
BELOW IS THE MODULE WHERE YOU LOAD IT INTO WHERE IT MAKES SENSE, i am running the Load and then Play function
--Temmies Tween Module
local TweenService = game:GetService("TweenService")
local module = {}
local function IsTweenable(value)
if typeof(value) ~= "EnumItem" and typeof(value) ~= "string" and typeof(value) ~= "BrickColor" and typeof(value) ~= "Instance" then
return true
else
return false
end
end
function module:IsTweenable(value)
return IsTweenable(value)
end
function CheckTableEquality(t1,t2)
for i,v in next, t1 do if t2[i]~=v then return false end end
for i,v in next, t2 do if t1[i]~=v then return false end end
return true
end
function module:Load(module, obj)
local code = module
local looping = false
local cancelled = false
local yes, no = pcall(function()
if code:IsA("ModuleScript") then
code = require(module)
looping = module:GetAttribute("Loop")
if looping == nil then
looping = false
end
end
end)
local objtable = {}
if not obj then
for uniqueid, v in pairs(require(module)[1].Values) do
local actualpart = game:GetService("CollectionService"):GetTagged("TIA."..uniqueid)[1]
table.insert(objtable, actualpart)
end
end
local objects = obj or objtable
local currenttweens = {}
return {
Play = function()
if currenttweens[1] == nil then
local cancelloop = false
if looping == false then
cancelloop = true
looping = true
end
while looping == true do
local num = 0
for i, v in pairs(code) do
num += 1
end
for currentnum=1, num do
local info = code[currentnum]
if cancelled == false then
local tweeninfo = info.TweenInfo
local tim = tweeninfo.Time
local newvalues = {}
for uniqueid, values in pairs(info.Values) do
newvalues[uniqueid] = {}
for namevalue, value in pairs(values) do
if IsTweenable(value) then
newvalues[uniqueid][namevalue] = value
end
end
end
for uniquevalue, actualnewvalues in pairs(newvalues) do
local objecttotween = nil
for i, obj in pairs(objects) do
if table.find(obj:GetTags(), "TIA."..uniquevalue) then
objecttotween = obj
end
end
print(actualnewvalues)
TweenService:Create(objecttotween, TweenInfo.new(tim, tweeninfo.EasingStyle, tweeninfo.EasingDirection), actualnewvalues):Play()
end
task.wait(tim)
currenttweens = {}
end
if cancelloop == true then
cancelloop = false
looping = false
end
end
cancelled = true
end
else
for i, tween in pairs(currenttweens) do
tween:Play()
end
end
end,
Cancel = function()
if currenttweens[1] ~= nil then
looping = false
for i, tween in pairs(currenttweens) do
tween:Cancel(0)
end
currenttweens = {}
cancelled = true
end
end,
Pause = function()
if currenttweens[1] ~= nil then
for i, tween in pairs(currenttweens) do
tween:Pause(0)
end
end
end,
Completed = function(waitt)
if waitt == true then
repeat wait() until cancelled == true
end
return cancelled
end,
}
end
return module
the module above is where the first module is all processed, and basically it RANDOMLY selects some of the parts that are supposed to tween when i start the game and only tweens those
local module = require(game.ReplicatedStorage:WaitForChild("T.I.A"))
script.Parent.MouseButton1Click:Connect(function()
local tween = module:Load(script.Parent.Parent:WaitForChild("Gun"):WaitForChild("TemmieTweens"):WaitForChild("shoot"))
tween.Play()
end)
this is a button that i press that runs the animation ingame
BELOW IS A VIDEO OF THE EXPECTED OUTCOME, IT WORKS IN THE PLUGIN AND IT USES THE SAME FUNCTION BUT DOESNT WORK INGAME
BELOW IS A REPRESENTATION OF HOW IT LOOKS IN MULTIPLE INSTANCES OF THE GAME RUNNING
i know this all seems like a really complicated process but it is just some tweens randomly not running and i do not know why, someone please help me out