here:
put this in the brick where it says "un-owned". Then, this will change the name of the brick it is in.
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
script.Parent.Name = h.Parent.Name.. "'s Farm"
local player = game.Players:playerFromCharacter(h.Parent)
if player == nil then
script.Parent.Name = "Un-Owned"
else
print("The Owner Is Still In The Game")
end
end
script.Parent.Touched:connect(onTouched) |