What I want to achieve is to insert a new rig into a player MID-game.
FYI (I use requires for this so it inserts it into the server)
- So ill start from the top. I have two Modules that move the UI and StarterCharacter into certain spots.
This is the code for the custom character.
local module = {}
function module.MainUI(target)
_G.target = target
local target = game.Players:WaitForChild(_G.target)
script.StarterCharacter:Clone().Parent = game.StarterPlayer
end
return module
Heres my code for UI (The UI works on its own when I used require or add it into StarterGUI. But the module for StarterPlayer doesn’t work) --The module scripts are basically the same–
local module = {}
function module.MainUI(target)
_G.target = target
local target = game.Players:WaitForChild(_G.target)
script.MainUI:Clone().Parent = target.PlayerGui
end
return module
I’ve search for at least 3 hours and found nothing.
So to wrap it all up, I just need the modules to do what they are meant to do, and be able to change the player mid-game.
I’m not asking anyone to make it for me, but help me on what to do so I can understand next time I do something similar. (It’s your choice if you want to or not)
You can message me here : Itz_N3p#6105