What do you want to achieve? I want it so that the startercharacter scripts load but its not loading for some reason
What is the issue? idk how to fix it and im not allowed to run/low health animation with this dev skin
What solutions have you tried so far? i put the startercharacter scripts in the character skin but it doesnt work
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.UserId == 178196501 then
local mm = plr.Character
local as = mm.Animate:Clone()
local devskin = game.ReplicatedStorage.Hank:Clone()
devskin.Parent = workspace
devskin:MoveTo(char.PrimaryPart.Position)
plr.Character = devskin
mm.Archivable = true
mm:Destroy()
as.Parent = devskin
end
end)
end)
The PlayerAdded event will only fire if there’s a valid player in the game, but since you placed it inside StarterCharacterScripts which would place that script as soon as a Character is added into the game, yeaah that’s why
If you don’t know what I mean:
The PlayerAdded event won’t be able to run first, as it’s waiting for the Character to properly load first when you placed it inside StarterCharacterScripts
Just reference that script inside ServerScriptService instead and it should work
Well, what kind of script is it exactly? A Server or Local?
If server, it should work fine if you place it there
If it’s Local, you’d need to change up your script a bit to possibly something like this:
local Player = game.Players.LocalPlayer
local Character = script.Parent
if Player.UserId == 178196501 then
local AS = Character.Animate:Clone()
local DevSkin = game.ReplicatedStorage.Rank:Clone()
DevSkin.Parent = workspace
DevSkin:MoveTo(Character.PrimaryPart.Position)
Character = Devskin
Character.Archivable = true
AS.Parent = DevSkin
Character:Destroy() --Wait why the heck are you doing this
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.UserId == 178196501 then
local mm = plr.Character
local as = mm.Animate:Clone()
local devskin = game.ReplicatedStorage.Hank:Clone()
devskin.Parent = workspace
devskin:MakeJoints()
devskin:MoveTo(char.PrimaryPart.Position)
plr.Character = devskin
mm.Archivable = true
mm:Destroy()
as.Parent = devskin
end
end)
end)
Since you’re cloning a model & it has Joints, I believe you’ll have to call the MakeJoints() function in order to properly weld everything you need, otherwise it’d just break apart & not work right
your script works but it doesnt put startercharacterscripts scripts into the model like it doesnt load the scripts in startercharacterscripts into my skin
nonoonon the animate script works fine its just that i need all of THESE scripts in the skin but it doesnt go in it for example the sprint script aka doesnt make me sprint
I believe you could just simply loop through everything inside StarterCharacterScripts, and clone everything from there onto the new Character (Or what Hank is supposed to be)
Not sure though, but try this?
local rep = game:GetService("ReplicatedStorage")
local nametag = rep:WaitForChild("NameTag")
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.UserId == 178196501 then
local mm = plr.Character
local as = mm.Animate:Clone()
local devskin = game.ReplicatedStorage.Hank:Clone()
devskin.Parent = workspace
devskin:MakeJoints()
devskin:MoveTo(char.PrimaryPart.Position)
plr.Character = devskin
mm.Archivable = true
mm:Destroy()
as.Parent = devskin
for _, Script in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
local ScriptClone = Script:Clone()
ScriptClone.Parent = devskin
end
end
end)
end)
Oh, my bad I included that in a different script I forgot to remove
This should work
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.UserId == 178196501 then
local mm = plr.Character
local as = mm.Animate:Clone()
local devskin = game.ReplicatedStorage.Hank:Clone()
devskin.Parent = workspace
devskin:MakeJoints()
devskin:MoveTo(char.PrimaryPart.Position)
plr.Character = devskin
mm.Archivable = true
mm:Destroy()
as.Parent = devskin
for _, Script in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
local ScriptClone = Script:Clone()
ScriptClone.Parent = devskin
end
end
end)
end)
IT WORKS!!! dude I’ve been trying to do this for like 3 hours or something omg11!!1!1!
I am so happy but anyways thanks for helping! I’ll give creditos to you in game in description and maybe a name tag or reference idkk
It depends entirely on what you want to do with that
You could just a ClickDetector so that it only changes your Character whenever you click on the object, cause the script you currently have would change your Character every time you respawn (Unless if you only want it to happen once)
Provided you have a Humanoid inside your Custom Character, try this?
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
if plr.UserId == 178196501 then
local mm = plr.Character
local as = mm.Animate:Clone()
local devskin = game.ReplicatedStorage.Hank:Clone()
devskin.Parent = workspace
devskin:MakeJoints()
devskin:MoveTo(char.PrimaryPart.Position)
plr.Character = devskin
mm.Archivable = true
mm:Destroy()
as.Parent = devskin
devskin:WaitForChild("Humanoid").Died:Connect(function()
wait(5)
plr:LoadCharacter()
end)
for _, Script in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
local ScriptClone = Script:Clone()
ScriptClone.Parent = devskin
end
end
end)
end)