Context:
- I’m Making a plugin for a friend to make things more productive and easier, her game is a outfit shop that works with modules to set up humanoid description in the mannequins, but everytime they want to modify it they’ll need to testplay to check if the mannequins are loading alright, so instead of doing that i’m trying to set-up a plugin that their team can use to fast set-up and preview aswell the mannequins, however i’m barely finding how .Source works, i’m kinda confused, so far i could understand it is mainly based on string.
What do i need help with:
- Setting up the .Source correctly, changing the modules values to the one inserted into the textButton
Module Code (placerholder one)
return {
LayeredClothing = {
TShirt = nil,
Shirt = nil,
Pants = nil,
Jacket = nil,
Sweater = nil,
Shorts = nil,
LeftShoe = nil,
RightShoe = nil,
DressSkirt = nil
},
ClassicClothing = {
GraphicTShirt = nil,
Shirt = nil,
Pants = nil
},
Accessories = {
BackAccessory = nil,
FaceAccessory = nil,
FrontAccessory = nil,
HairAccessory = nil,
HatAccessory = nil,
NeckAccessory = nil,
ShoulderAccessory = nil,
WaistAccessory = nil
},
Animation = {
ClimbAnimation = nil,
FallAnimation = nil,
IdleAnimation = nil,
JumpAnimation = nil,
MoodAnimation = nil,
RunAnimation = nil,
SwimAnimation = nil,
WalkAnimation = nil
},
BodyParts = {
Face = nil,
Head = nil,
LeftArm = nil,
LeftLeg = nil,
RightArm = nil,
RightLeg = nil,
Torso = 48474356
},
BodyColors = {
HeadColor = Color3.new(1, 1, 1),
LeftArmColor = Color3.new(1, 1, 1),
LeftLegColor = Color3.new(1, 1, 1),
RightArmColor = Color3.new(1, 1, 1),
RightLegColor = Color3.new(1, 1, 1),
TorsoColor = Color3.new(1, 1, 1)
},
Scale = {
BodyTypeScale = nil,
DepthScale = nil,
HeadScale = nil,
HeightScale = nil,
ProportionScale = nil,
WidthScale = nil
}
}
entire Plugin Code (not complete)
--//Plugin made for WRYNX Outfit Shop use! {By NightlyOne. / XPotatoX }
--[[
⚠ BE SURE TO CONTACT ME OR SOMEONE WITH KNOWLEDGE ON THIS PLUGIN BEFORE USING IT! ⚠
This is not recommended for anything else than modifying the Mannequins inside the Wrynx Place!
]]
--//Services
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Selection = game:GetService("Selection")
local RunService = game:GetService("RunService")
--//Plugin Info
local Toolbar = plugin:CreateToolbar("Wrynx Plugins")
local ManagerPlugin = plugin:CreateButton(
"WRYNX | Mannequins Manager",
"Manage easily mannequins inside Wrynx!",
"rbxassetid://15487786096"
)
--//Variables
local ScreenGui = script.Parent
local Background = ScreenGui:WaitForChild("Background")
local ScrollingFrame = Background:WaitForChild("ScrollingFrame")
local Viewport = Background:WaitForChild("Viewport")
local Settings = Background:WaitForChild("Settings")
local hbConnection
local hbConnection1
local hbConnection2
local DefDescription
--//Buttons
local Buttons = {
BodyParts = ScrollingFrame:WaitForChild("BodyParts");
Animations = ScrollingFrame:WaitForChild("Animations");
Scale = ScrollingFrame:WaitForChild("Scale");
LayeredClothing = ScrollingFrame:WaitForChild("LayeredClothing");
ClassicClothing = ScrollingFrame:WaitForChild("ClassicClothing");
Accessories = ScrollingFrame:WaitForChild("Accessories");
BodyColors = ScrollingFrame:WaitForChild("BodyColors");
}
--//Functions
local function recreateModule(module: ModuleScript)
local newModule = Instance.new("ModuleScript")
newModule.Parent = module.Parent
local source = {
LayeredClothing = {
TShirt = nil,
Shirt = nil,
Pants = nil,
Jacket = nil,
Sweater = nil,
Shorts = nil,
LeftShoe = nil,
RightShoe = nil,
DressSkirt = nil
},
ClassicClothing = {
GraphicTShirt = nil,
Shirt = nil,
Pants = nil
},
Accessories = {
BackAccessory = nil,
FaceAccessory = nil,
FrontAccessory = nil,
HairAccessory = nil,
HatAccessory = nil,
NeckAccessory = nil,
ShoulderAccessory = nil,
WaistAccessory = nil
},
Animation = {
ClimbAnimation = nil,
FallAnimation = nil,
IdleAnimation = nil,
JumpAnimation = nil,
MoodAnimation = nil,
RunAnimation = nil,
SwimAnimation = nil,
WalkAnimation = nil
},
BodyParts = {
Face = nil,
Head = nil,
LeftArm = nil,
LeftLeg = nil,
RightArm = nil,
RightLeg = nil,
Torso = 48474356
},
BodyColors = {
HeadColor = Color3.new(1, 1, 1),
LeftArmColor = Color3.new(1, 1, 1),
LeftLegColor = Color3.new(1, 1, 1),
RightArmColor = Color3.new(1, 1, 1),
RightLegColor = Color3.new(1, 1, 1),
TorsoColor = Color3.new(1, 1, 1)
},
Scale = {
BodyTypeScale = nil,
DepthScale = nil,
HeadScale = nil,
HeightScale = nil,
ProportionScale = nil,
WidthScale = nil
}
}
local _source = game:GetService("HttpService"):JSONEncode(source):gsub("%[",""):gsub("%]",""):gsub(",", ", ")
for i,v in require(newModule) do
for k,j in v do
j = module[i][k]
end
end
end
local function OpenTool()
if ScreenGui.Enabled then
ScreenGui.Enabled = false
if hbConnection then hbConnection:Disconnect() end
else
ScreenGui.Enabled = true
local clothingHolder = Instance.new("ModuleScript", ScreenGui)
clothingHolder.Name = "ClothingH"
local selected = Selection:Get()
task.spawn(function()
hbConnection = RunService.Heartbeat:Connect(function()
selected = Selection:Get()
if #selected == 0 or nil then
Background.Warning.Visible = true
else
Background.Warning.Visible = false
end
end)
end)
task.spawn(function()
-- preview
while ScreenGui.Enabled do
if selected and selected[1]:FindFirstChild("Clothing") then
if #selected ~= 1 then
Viewport.ViewportFrame.Warning.Visible = true
elseif #selected == 1 then
Viewport.ViewportFrame.WorldModel:ClearAllChildren()
local Description = Instance.new("HumanoidDescription", ScreenGui)
for _,n in require(selected[1]:FindFirstChild("Clothing")) do
for j,m in n do
Description[j] = m
end
end
local mqn = game:GetService("Players"):CreateHumanoidModelFromDescription(Description, selected[1].Humanoid.RigType)
Description:Destroy()
mqn.Parent = Viewport.ViewportFrame.WorldModel
if Viewport.ViewportFrame:FindFirstChild("Camera") then
Viewport.ViewportFrame:FindFirstChild("Camera"):Destroy()
end
local camera = Instance.new("Camera")
local viewportCamera = Instance.new("Camera")
Viewport.ViewportFrame.CurrentCamera = viewportCamera
viewportCamera.Parent = Viewport.ViewportFrame
viewportCamera.CFrame = CFrame.new(mqn.HumanoidRootPart.Position - Vector3.new(0, 0, 5.5)) * CFrame.Angles(0, math.rad(180), 0)
end
end
task.wait(1)
end
end)
for _,bt in ScrollingFrame:GetChildren() do
if bt:IsA("TextButton") then
bt.MouseButton1Click:Connect(function()
recreateModule(selected[1]:FindFirstChild(""))
for _,nt in Settings.ScrollingFrame:GetChildren() do
if nt:IsA("TextButton") and nt.Name ~= "Template" then
nt:Destroy()
end
end
if #selected == 1 then
for i,v in require(selected[1]:FindFirstChild("Clothing"))[bt.Name] do
local template = Settings.ScrollingFrame.Template:Clone()
template.Name = i
template.Text = i
template.TextButton.MouseButton1Click:Connect(function()
local result = template.TextBox
local Clothing
end)
end
end
end)
end
end
task.spawn(function()
while ScreenGui.Enabled and #selected > 0 do
task.wait(1)
end
end)
end
end
- So as you can see in the Module code and the simple ui i made, i want to do so if they press the checkmark button with the id written it will be applied inside the module scripts.
Any help, tips and feedback is highly appreciated!