So what I'm trying to do is make it so I can just copy the team block and change literally 2 values and boom, so I don't have to make all my code different and make it take years to change every little thing, but part of it isn't working, and the error I'm getting is "Arguement 1 missing or nil", here is my code.
local value = script.Parent.spawn.Value -- The value its reading is a string value that is called what the spawn block is called, in this case its "evilspawn", but thats not really important
local teemspawn = workspace:FindFirstChild(teamspawns):FindFirstChild(""..value.."") -- This is the part it seems to break on, this is trying to find where in the folder called "teamspawns" the spawn block is.
script.Parent.Touched:connect(function(Hit) -- none of this function is important.
Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Player then
Player:LoadCharacter()
Player.Character.Torso.Position = teemspawn.Position * (Vector3.new(0, 5, 0))
end
end)
