Streamable.com Video
there was an error every time i tried to upload this so i used streamable
in the vid when they rejoin a fourth time they don’t show up and the more the people the lower they can re join so lets say there’s 2 people and the person rejoins the 3rd time they don’t show up and if there’s 3 people and the person rejoins a 2nd time they don’t show up and so on and so on
here’s the script
-- // Services
local Players = game:GetService("Players")
-- // Variables
local Dummies = workspace.Dummies:GetChildren()
local DummyCharacters = {}
-- Setup all the dummies into the table
for _, dummy in pairs(Dummies) do
table.insert(DummyCharacters, {Model = dummy, Player = nil})
end
-- // Functions
-- Player joins the game and set one of the available dummise to the player
Players.PlayerAdded:Connect(function(Player)
-- Loop through all the dummies
for _, dummy in DummyCharacters do
-- Check if the dummy already have a player assigned and if it has a Humanoid object
if not dummy.Player and dummy.Model:FindFirstChild("Humanoid") then
-- Set the player
dummy.Player = Player
-- Get the HumanoidDescription
local HumanoisDescription = Players:GetHumanoidDescriptionFromUserId(Player.UserId)
-- Apply the HumanoidDescription
dummy.Model:FindFirstChildOfClass("Humanoid"):ApplyDescription(HumanoisDescription)
dummy.Model:FindFirstChild("Right Arm").Transparency = 0
dummy.Model:FindFirstChild("Left Arm").Transparency = 0
dummy.Model:FindFirstChild("Right Leg").Transparency = 0
dummy.Model:FindFirstChild("Left Leg").Transparency = 0
dummy.Model:FindFirstChild("Torso").Transparency = 0
dummy.Model:FindFirstChild("Head").Transparency = 0
if dummy.Model:FindFirstChild("Walkie Talkie") then
dummy.Model:FindFirstChild("Walkie Talkie")["Meshes/untitled"].Transparency = 0
end
return
end
end
end)
-- Player leaves the game and remove the player from any dummies they are "attached" to
Players.PlayerRemoving:Connect(function(Player)
-- Loop through all the dummies
for _, dummy in DummyCharacters do
-- If the dummy has the player
if dummy.Player == Player then
local Humanoid = dummy.Model:FindFirstChildOfClass("Humanoid")
-- Create new HumanoidDescription
local NewDescription = Instance.new("HumanoidDescription")
-- Set all the body colours to Medium Stone Grey
NewDescription.HeadColor = Color3.fromRGB(163, 162, 165)
NewDescription.LeftArmColor = Color3.fromRGB(163, 162, 165)
NewDescription.LeftLegColor = Color3.fromRGB(163, 162, 165)
NewDescription.RightArmColor = Color3.fromRGB(163, 162, 165)
NewDescription.RightLegColor = Color3.fromRGB(163, 162, 165)
NewDescription.TorsoColor = Color3.fromRGB(163, 162, 165)
-- // Apply the description
Humanoid:ApplyDescription(NewDescription)
dummy.Model:FindFirstChild("Right Arm").Transparency = 1
dummy.Model:FindFirstChild("Left Arm").Transparency = 1
dummy.Model:FindFirstChild("Right Leg").Transparency = 1
dummy.Model:FindFirstChild("Left Leg").Transparency = 1
dummy.Model:FindFirstChild("Torso").Transparency = 1
dummy.Model:FindFirstChild("Head").Transparency = 1
if dummy.Model:FindFirstChild("Walkie Talkie") then
dummy.Model:FindFirstChild("Walkie Talkie").Transparency = 1
end
end
end
end)
i cant seem to fix it this is the only problem im running into with this script rn