I have this module script(Intended to give a player a custom morph when they spawn, cloning the model morph, into a players character and welding It to the players body) but its not working, NO errors, and doesn't do anything. Module Code:
local module = {}
function module.MorphPlayer(char, morph)
local settings = require(script.Settings)
local m = morph:Clone()
m.Parent = char
for i, v in pairs(m:GetChildren()) do
if v:FindFirstChild("MainPart") then
for i, p in pairs(v:GetChildren()) do
if p.Name ~= "MainPart" then
local w = Instance.new("Weld", p)
w.Part0 = v.MainPart
w.Part1 = p
w.C1 = p.CFrame:inverse() * v.MainPart.CFrame
Instance.new("BodyForce", p).force = Vector3.new(0, p:GetMass() * 196.2, 0)
p.Anchored = false
else
if p:FindFirstChild("face") then
p.face:Destroy()
end
p.Anchored = false
p.Transparency = 1
p.CanCollide = false
local w = Instance.new("Weld", p)
w.Part0 = char[v.Name]
w.Part1 = p
end
end
end
if settings.RemoveHats then
if v:IsA("Hat") then
v:Destroy()
end
end
if settings.RemoveCharacterMeshes then
if v:IsA("CharacterMesh") then
v:Destroy()
end
end
if settings.RemoveClothes then
if v:IsA("Shirt") or v:IsA("Pants") then
v:Destroy()
end
end
end
end
return module
Code for running module(Inside serverscriptservice)
local Morph = require(game.ReplicatedStorage.MorphModule)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
Morph.MorphPlayer(character, game.ReplicatedStorage.Morph)
end)
end)

3 comments
I used these codes you provided, its still not working as intended? any ideas?
Something in your modulescript is halting. It's called correctly now as I fixed that. It looks like you have another module script running. Is that one called correctly also? Syntax correct? Has it's global as I said?
This is the only two scripts running, no nothing else