Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I made a 2 Player war tyccon the Become a Builder or Fighter thing Dosent work?

local ting = 0
owner = script.Parent.Parent.Parent.OwnerName

function onTouched(hit)
	if ting == 0 then
	ting = 1 
	local check = hit.Parent:FindFirstChild("Humanoid")
		if check ~= nil then 
			local thisplr = game.Players:findFirstChild(hit.Parent.Name)
			if (thisplr~=nil) then
				local ownstyc = thisplr:findFirstChild("Tycoon")
				if (ownstyc~=nil) then
					if ownstyc.Value == 0 then
						ownstyc.Value = 1
						owner.Value = thisplr.Name
						thisplr.TeamColor = BrickColor.new(script.Parent.Parent.Parent.Parent.Col.Value)
						
						local message = Instance.new("Message")
						message.Text = "You Now own a Tycoon"
						message.Parent = thisplr.PlayerGui
						wait(3)
						message:remove()
						script.Parent.Parent:remove()
					elseif ownstyc.Value == 1 then
						local message = Instance.new("Message")
						message.Text = "You Already own a Tycoon"
						message.Parent = thisplr.PlayerGui
						wait(3)
						message:remove()
					end
				end
			end
		end
	ting = 0
	end
end

script.Parent.Touched:connect(onTouched) 

There are 2 of these on the Tycoon, its 2 player, Is there somthing wrong with this script? its not working in General, The Block dosent become Transparent in General so you cant walk in.... any help?????

2 comments

1

Well it's saying that ownstyc is most likely nil. Do you have a thing inside of that player named 'Tycoon'?

0

no, i donot think so, how do i check?

1 answer

I don't think it's the script, It's the same with the other tycoon kits, You have to test in a public game not on Test Solo.

This discussion is preserved as it was. New answers, comments, and votes are closed.