It is not Changing Team or Dying

crappyMinigame

-- Variables
local Ball = script.Parent.Ball
local RoundStart = script.Parent.RoundStart.Value

-- Minigame Handeler
local function Clone()
	local Clone = Ball:Clone()
	Clone.Clone.Value = script.Parent
	Clone.Transparency = 0
	Clone.Parent = script.Parent
	Clone.Position = Clone.Position + Vector3.new(math.random(6,242),0,0)	
	Clone.Anchored = false
	return Clone()
end

while true do 
	wait(0.5)
	if RoundStart == true then
		Clone()
	end
end


epicBallScript

local Clone = script.Parent.Clone.Value

Clone.Touched:Connect(function(touch)
	if touch.Parent:FindFirstChild("Humanoid") then
		local plr = game.Players:GetPlayerFromCharacter(touch.Parent)
		plr.Team = game.Teams.Spectator
	elseif touch.Name == ("DestroyPart") then
		Clone:Destroy()	
	end
end)

image
image

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

“Clone” is a function in lua
To call the object instead of the function do:

local Clone = script.Parent["Clone"].Value

Additionally you need to change the name of your function, so it doenst overlap with the lua clone function

local function Clone()--Change to CloneBall() or something
1 Like

You should just avoid using variable names that are already functions in general.