****This is a local script in a GUI on a filtering enabled game, I'm designing it for creating groups in which players can make so they don't accidentally kill each other, this script looks perfect to me and has no output errors, however, the ObjectValue is never created when I look.
function group()
if script.Parent.crgroup.Text == "Create Group" then
script.Parent.crgroup.text = "Disband Group"
grouper = Instance.new("ObjectValue")
grouper.Parent = game.Players.LocalPlayer
grouper.Name = "GroupLeader"
script.Parent.Invite.Visible = true
script.Parent.NameInvite.Visible = true
else
local findgroup = game.Players.LocalPlayer:FindFirstChild("GroupLeader")
if findgroup then
findgroup:Destroy()
end
end
end
function inviteplayer()
for i,v in ipairs(game.Players:GetChildren()) do
if v.Name == script.Parent.NameInvite.Text then
--to be continued
end
end
end
script.Parent.crgroup.MouseButton1Click:connect(group)
script.Parent.Invite.MouseButton1Click:connect(inviteplayer)
By the way, I am not good at scripting but have a semi general understanding.

1 comment
You need to create the group on the server and not on the local script.