Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

For some reason my script cannot determine that i am the owner of the game?

Asked by 4 years ago

For some reason my script cannot determine that i am the owner of the game even though game.CreatorId and plr.UserId are the same

Here is the code:

function module.IsOwner(plr)
    if game.CreatorType == Enum.CreatorType.User then
        if plr.UserId == game.CreatorId then
            return true
        end
    elseif game.CreatorType == Enum.CreatorType.Group then
        if plr:IsInGroup(game.CreatorId) then
            if plr:GetRankInGroup(game.CreatorId) == 255 then
                return true
            end
        end
    end
    return false
end
0
Did you actually require this module? firestarroblox123 440 — 4y
0
Can I see the script that uses this module? firestarroblox123 440 — 4y
0
Try using player.name, that will probably work. ghxstlvty 133 — 4y
0
No that will not, the CreatorId is a UserId. firestarroblox123 440 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I solved this my using a different method, thanks anyone who tried to help!

Ad

Answer this question