Showing up for both text labels, why?

I didn’t have a script for that. I also called one of them “Main1” and “Main2”, I just didn’t show the other script. It’s the exact same just with different names, is that the problem?

Show the script where you did something to the stands.

I don’t have a script specifically for the stand, but the server script at the very top was inside the Stand/Main Part inside a surface ui.

You should add the name of the stands like

remoteEvent:FireServer(stand_name,"name", script.Parent.GameName.Text)

Sorry if it isn’t right. Still confused

Thats The Image of what I have, as you can see main1 and main2 are the actual parts im talking about. As in the stand are just models. In the frame, thats where I click done

Could you explain what your mean or how you do that?

@YXFrosty is this what you mean?:

remoteEvent:FireServer(workspace.MainParts.Main1, "name", script.Parent.Parent.GameName.Text)

I’d love to help but it’s kind of confusing me, could you explain it in a different way maybe? Defining some of the stuff listed above?

I have a button and when and when I click done it will present text on the part(I have two parts) but when I click done, both of them present the text but I want it to only present on their parts, not others.

robloxapp-20210831-1955311.wmv (1.1 MB)

As you can see I clicked On the red part/stand, but presented on the other one too.
(Download the video if you can)

The picture of the explorer shows main1 and main2. I presented main2

You should try and identify the stand that the player owns, and make the changes to that certain stand for all the players, adding a check to also see if the player owns the actual stand so it won’t be exploited.

When you click on the stand, will your name be inside of a StringValue inside of the stand model? If that’s the case, you can possibly make it work and checked this way.

No I made an int value inside the click detector script, and seen if the player claimed that. If it was claimed it would equal one then they would claim it anymore:

local PlayerCollectedItem = false
local Claimed
script.Parent.MouseClick:Connect(function(player)
	if Claimed == nil then
		script.Parent.Parent.BillboardGui.TextLabel.Text = "Owned By No One" 
		Claimed = Instance.new("NumberValue")
		Claimed.Name = "Claimed"
		Claimed.Value = 0
		Claimed.Parent = player

		if script.Parent.Parent.BillboardGui.TextLabel.Text == "Owned By No One" then
			if Claimed.Value == 0 then
				Claimed.Value = 1
				if Claimed.Value == 1 then
					PlayerCollectedItem = true
					script.Parent.Parent.BillboardGui.TextLabel.Text = "Owned By "..player.Name
				end
			end
		end
	end
end)

If I was you, I’d make a StringValue inside of that stand, and I’d change its Value to the Player’s name if it’s owned, when the player leaves, I’d make it so it becomes nil again and stand returns to default settings (name and descriptions). That way you can also find what stand the player owns more easily, if they own anything anyways.

So Should I delete the Claimed Script? Or should I just Change it?

You should make changes, just make it work right, don’t head for perfection, you can always improve things, but firstly, make them function correctly.

1 Like

What do I Change, I did what I thought I had to do, but its the same, sorry if you think I’m not good at this, I’m still learning.

local PlayerCollectedItem = false
local Status = script.Parent.Parent.Status

game.Players.PlayerAdded:Connect(function(player)
	script.Parent.MouseClick:Connect(function(player)
		Status.Value = "Owned By "..player.Name
		PlayerCollectedItem = true
	end)
end)

game.Players.PlayerRemoving:Connect(function()
	Status.Value = nil
	PlayerCollectedItem = false
end)

Make it so when you click on the stand the player becomes the owner of that stand, the StringValue inside the stand model has the Player’s name as the value.

You can make it so there is a value inside of the Player that says which stand they own, else it’s nil.

Which type of value do I use to put inside the player and how do I put it in the player?

You can put an ObjectValue in the player and have the Value be the stand Model. You can do this through a Server Script when a Player joins the game.

Like this?:

local PlayerCollectedItem = false
local Status = script.Parent.Parent.Status

game.Players.PlayerAdded:Connect(function(player)
	script.Parent.MouseClick:Connect(function(player)
		Status.Value = player.Name
		PlayerCollectedItem = true
		
		local ObjectValue = Instance.new("ObjectValue")
		ObjectValue.Name = "ObjectValue"
		ObjectValue.Value = workspace.MainParts.Main1
		ObjectValue.Parent = player
	end)
end)

No like this:

local PlayerCollectedItem = false
local Status = script.Parent.Parent.Status

game.Players.PlayerAdded:Connect(function(player)
	Status.Value = player.Name
	PlayerCollectedItem = true
	
	local ObjectValue = Instance.new("ObjectValue")
	ObjectValue.Name = "ObjectValue"
	ObjectValue.Value = workspace.MainParts.Main1
	ObjectValue.Parent = player
end)