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

Why Won't This Script Work

I have been trying to make tycoon for the past two days with no luck its my very first tycoon and I just don't know where I am going wrong I have tried this script but with no luck btw this is for the bit where you touch the part become the owner of the tycoon

function GetOwner (h)
	if h:FindFirstChild("humanoid") then
		Game.Workspace.OwnerFinder.Name = (h)
		Game.Workspace.OwnerFinder:Remove()
	end
end

Script.Parent.Touched:connect(GetOwner)

Also I am changing the name of the brick itself for testing purposes soon it will be text above the brick but I need to know how to do that.

1 answer

function GetOwner(h)
	if h:FindFirstChild("Humanoid") then
		game.Workspace.OwnerFinder.Name = h
		game.Workspace.OwnerFinder:Remove()
	end
end

script.Parent.Touched:connect(GetOwner)

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