Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Auto Char On Spawn Script Aint Working, How to fix?

Asked by
Danfly 5
9 years ago

I am trying to make a game how it spawns everyone in the same char and this isnt working, If I could have some assistance that would be nice :)

local Id = 55568594

repeat wait() until game.Players.LocalPlayer.Character ~= nil
repeat wait() until game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")
local player = game.Players.LocalPlayer
if player.CharacterAppearance ~= "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..Id then
    player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..Id
    player.Character.Humanoid.Health = 0
end
wait(0.5)
script:remove()

1 answer

Log in to vote
0
Answered by 9 years ago

I do not know how to do that but I know a script that allows certain clothes to players in a certain group.

groupID=1168211
shirtID=168017763
pantsID=168017763
game.Players.ChildAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
delay(1, function()

if p:IsInGroup(groupID) then
if c:FindFirstChild("Shirt")~=nil then c.Shirt:Destroy() end
if c:FindFirstChild("Pants")~=nil then c.Pants:Destroy() end

local news=Instance.new("Shirt",c)
news.ShirtTemplate="http://www.roblox.com/asset/?id="..shirtID - 1

local newp=Instance.new("Pants",c)
newp.PantsTemplate="http://www.roblox.com/asset/?id="..pantsID - 1

end
end)
end)
end)

Really sorry I can't answer what you asked.

Ad

Answer this question