Help my script dont work


a scripter made a group prop limit thing for my server, but it don’t working it don’t count or something and it does no stop you to spawn prop when you hit the max proplimit for that server:

Here is the code:

function SetPropLimits(ply)
            timer.Simple(5, function()
                    if ply:GetUserGroup() == "donator" or ply:GetUserGroup() == "moderator" then
                            ply.MaxProps = 280
                    elseif ply:CheckGroup("super donator") then
                            ply.MaxProps = 350
                            ply.MaxProps = 200
    hook.Add("PlayerInitialSpawn", "SetPropLimits", SetPropLimits)
    function CheckPropLimit(ply, model, ent)
            if ply:GetCount("props") >= ply.MaxProps then
                    GAMEMODE:Notify(ply, 1, 6, "You have reached your prop limit!")
    hook.Add("PlayerSpawnedProp", "CheckPropLimit", CheckPropLimit)

(User was banned for this post (""fix my code", undescriptive thread title, didn't even bother pasting the lua error if any" - Gran PC))

Note that the title of this section is “developer’s discussion”, not “script support section”. You’ve already said you didn’t code it and obviously do not know how to code, therefore you aren’t a developer. Go to and see if someone will fix the script for you, find a new coder to continue work on your project, or learn to code yourself (it’s not hard).

To begin, I’d use print(“Test”) to see if it is running in the first place. And as a suggestion, you can use PlayerSpawnProp and return false instead of PlayerSpawnedProp and deleting the entity.