Code:

local tycoon = script.Parent.Parent.Parent.Parent.Parent
local gate = script.Parent

gate.Touched:Connect(function(Hit)
	local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
	if Player then
		local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
		if Humanoid then
			if Hit.Parent.Humanoid.Health >= 1 then
				if script.Parent.Transparency == 0 then
					if gate.Transparency == 0 then
						for i, tycoonModel in pairs(script.Parent.Parent.Parent.Parent.Parent.Parent:GetChildren()) do
							if tycoonModel:IsA("Model") then
								if tycoonModel.Owner.Value ~= Player then
									if tycoonModel.Owner.Value == nil then
										if script.Parent.Parent.Parent.Parent.Parent.Owner.Value == nil then
											gate.Transparency = .7
											gate.CanCollide = false
											tycoon.Owner.Value = Player
											Player.TeamColor = script.Parent.Parent.Parent.Parent.Parent.TeamColor.Value
											gate.GateGui.TextLabel.Text = Player.Name.."'s Tycoon!"
										end	
									end
								end
							end
						end
					end
				end	
			end
		end
	end
end)

8 comments

0

What's the question?

0

It is allowing players to claim multiple tycoons

0

Is there an error, i dont have enough context to know what you need. Are you asking how to make a script to allow players to claim multiple tycoons

0

No. I am trying to make a 2 player tycoon.

0

soooooo what do you need help with then?

0

If the problem is that the player can claim more tycoons, then make some code that doesn't allow them to do so.

0

It is, but i dont know how to.

0

No errors Roblox Lua