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

Why wont my script work? *UPDATED*

Asked by 10 years ago

I want there to be a door only certain people can get in, and I want it so there can be NO bypassing. What I want it to do is clone a door from ServerStorage if they are on the list and clone a wall if they are not. This is what I have but I never see anything cloned where I want it to be:

UPDATE Like in TMM (The Mad Murder) under the hatch, I think it needs to be cloned somewhere else so admins see something different, but where?

allow = game.ServerStorage.Allow
deny = game.ServerStorage.Deny
Permission = {"UndiscoveredLimited","Idontcare2004","moonmim","Amy21227","funkstaducksta"}

game.Players.PlayerAdded:connect(function(p)
    for i = 1,#Permission do
        if p.Name == Permission[i] then
            a = allow:Clone()
            a.Parent = p.PlayerGui -- I'm not sure where it's meant to go
        elseif p.Name ~= Permission[i] then
            d = deny:Clone()
            d.Parent = p.PlayerGui -- I'm not sure where it's meant to go
        end
    end
end)

1 answer

Log in to vote
0
Answered by 10 years ago

Is this the full script? try changing the

            a = allow:Clone()
            a.Parent = p.PlayerGui -- I'm not sure where it's meant to go

            d = deny:Clone()
            d.Parent = p.PlayerGui -- I'm not sure where it's meant to go

to

            allow = allow:Clone()
            allow.Parent = p.PlayerGui -- I'm not sure where it's meant to go

            deny = deny:Clone()
            deny.Parent = p.PlayerGui -- I'm not sure where it's meant to go

The reason I think this would work is because there is no variable called "a" or "d"

Ad

Answer this question