I have a script where it detects after the ball hits the ground, it resets everyone and puts the ball at a certain spot, the spot is infront of the team's spawn. But there's 2 different spawns on each sides of the map, Lets say Team 1 threw it and it hits the ground, I'd want the ball to spawn at Team 2's spawn and vice versa. I'm stumped, thanks for looking this over.
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Football")
then print("Reset")
for i, player in ipairs(game.Players:GetPlayers()) do
if player.Character then
local hum = player.Character:FindFirstChild('Humanoid')
if hum then
wait(4)
hum.Health = 0
player:LoadCharacter()
local newItem = game.ReplicatedStorage.Football:Clone()
newItem.Handle.CFrame = CFrame.new(-189.549, 1.55, -37.55)
newItem.Parent = workspace
end
end
end
end
end)
Thats the script so far, but I dont know how to detect who held it and what team they were on after it was thrown and hit the ground...

3 comments
How would I go about inputting that into a script?
im not going to give it to you, if you want to learn, then study
you insert a string value into the script, and when the ball is cloned, also clone the stringvalue and put it into the ball, but set the value of it to the player's name before cloneing it, only two things, that simple, do it