I’m going to make an attempt to use the other guys small code, could you help me with his?
else StringValue.Value = hit.Parent.Name
.
Where would I place it in the code?
I see a lot of complicated methods, but an easy way to do this is to use the CollectionService, already developed by Roblox. You can just add a Collection Service Tag, using the player’s name and the tag, as follows:
local CollectionService = game:GetService("CollectionService")
CollectionService:AddTag(PAD,player.Name.."_padownership")
(PAD is your object, block, model, any Roblox Instance can be tagged…)
and then just check if they already have a pad tagged in existence by doing this
local owned_items = CollectionService:GetTagged(player.Name.."_padownership")
which will return an array of anything tagged or nil if nothing exists. Easy, simple, elegant.
You might even add a tag named “Owned” or “Locked” so other players can’t try taking ownership by doing this check:
local lockflag = CollectionService:HasTag("LOCKED")
You can even check for these tags across the Streaming Filter (both local client scripts and server scripts can check for these tags which makes them VERY powerful and useful!)
Okay, can you help me do this because I don’t really know how to?
yeah maybe I can inbox you here to help get you started. But from what I see, you have the “Pad” parts… You could probably setup a touched event that then checks if the player has claimed a pad, and if the pad is available. If its available, then use the AddTag, like I have in the example above, to the part.
Give it a try and experiment. If you know how to do Touched Events then Collection service is super easy.
Hmm its so easy maybe I can even do a quick place for you to get an example…
Here’s the api documentation.
the pads have different names, area1,area2,area3,area4, etc
OKay, sounds good, I actually almost finished this, but had to take a break. I’m going to post an example that works pretty good, but I need to add a debounce to it, later on when I get back to it.