game.CreatorId returns 0

local closed = true

script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer

	if plr.UserId ~= game.CreatorId then
		print(plr.UserId, game.CreatorId) -- my id, 0
		print("not owner")
		if closed == true then
			closed = false
			script.Parent.Parent.ToolSelect.Visible = true
			script.Parent.Parent.SubToolSelect.Visible = true
		else
			closed = true
			script.Parent.Parent.ToolSelect.Visible = false
			script.Parent.Parent.SubToolSelect.Visible = false
		end
	else
		print("owner")
		plr:Kick("What? Cant figure out the error... Anyways, you can rejoin")
	end
end)

the question is title, game.CreatorId returns 0.
image

this is local script

image

in begin CPanel is stored in ServerStorage, then clone to playerGui

does this thread help?

1 Like

ye, i’ve been thinking about it, but thought if there is another solution

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.