So if the player is a demon, it would position them to the spawn, but if they're a human, they won't be positioned to a random spawn
function module:SpawnCharacter(plr,char,data)
local D = math.random(1,2)
local S = math.random(1,6)
print("D and S Active!")
local HRP = char:FindFirstChild("HumanoidRootPart")
if data.Race.Value == "Demon" then
if D == 1 then
local NewCFrame1 = game.Workspace.Spawns.DemonSpawn1.CFrame
HRP.CFrame = NewCFrame1
print("Spawned Char")
elseif D == 2 then
local NewCFrame2 = game.Workspace.Spawns.DemonSpawn2.CFrame
HRP.CFrame = NewCFrame2
print("Spawned Char")
else
if S == 1 then
local NewCFrame3 = game.Workspace.Spawns.SlayerSpawn1.CFrame
HRP.CFrame = NewCFrame3
print("Spawned Char")
elseif S == 2 then
local NewCFrame4 = game.Workspace.Spawns.SlayerSpawn2.CFrame
HRP.CFrame = NewCFrame4
print("Spawned Char")
elseif S == 3 then
local NewCFrame5 = game.Workspace.Spawns.SlayerSpawn3.CFrame
HRP.CFrame = NewCFrame5
print("Spawned Char")
elseif S == 4 then
local NewCFrame6 = game.Workspace.Spawns.SlayerSpawn4.CFrame
HRP.CFrame = NewCFrame6
print("Spawned Char")
elseif S == 5 then
local NewCFrame7 = game.Workspace.Spawns.SlayerSpawn5.CFrame
HRP.CFrame = NewCFrame7
print("Spawned Char")
elseif S == 6 then
local NewCFrame8 = game.Workspace.Spawns.SlayerSpawn6.CFrame
HRP.CFrame = NewCFrame8
print("Spawned Char")
end
end
end
end

1 comment
Thank you! It works. This makes a lot more sense. I had no idea what the problem was.