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

Frame value doesn't change?

Asked by 4 years ago

So for some reason this does not change the value of this Frame please help me!

    Player.Chatted:connect(function(message)
        if message:lower() == "skip" then
            if groupId > 0 then
game.StarterGui.NoPerms.Frame.Visible = true
wait(3)
game.StarterGui.NoPerms.Frame.Visible = false
0
Can you send the whole script? Techyfied 114 — 4y
0
I have sent you the whole script. JustSxript 36 — 4y
0
uh, it's broken. There's no linespace in it and i cant understand. Techyfied 114 — 4y
1
You're changing the value of the frame in the starter gui. Guis are cloned from the starter gui into the player. They won't get the new gui with the invisible frame until they reset. Instead, change the PLAYERS frame. royaltoe 5144 — 4y
View all comments (3 more)
0
Could you explain this with the script so I could copy and paste it? JustSxript 36 — 4y
0
yeah ok royaltoe 5144 — 4y
0
So, maybe add an "end)" when closing your if statement? That's probably the problem. NightWarrior1717 14 — 3y

3 answers

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

Here's the example I was talking about:

My only concern is I don't know what if groupId > 0 then is so I commented it out for now Could you explain that a bit more? If this doesn't work we can team create.

Here is how you would do it from a server (normal) script:

game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        local playerSaidSkip = message:lower() == "skip"

        if playerSaidSkip  --[[and groupId > 0 ]]  then
            player.PlayerGui.NoPerms.Frame.Visible = true
            wait(3)
            player.PlayerGui.NoPerms.Frame.Visible = false
        end
    end)
end)

You can do this from a local script too: make sure you put the local script directly inside the NoPerms gui in the startergui

local player = game:GetService("Players").LocalPlayer
local frame = script.Parent.Frame --since this script is inside the starter gui, we can reference the frame by saying script.Parent (the noperms gui) .Frame (the frame)

player.Chatted:Connect(function(message)
    local playerSaidSkip = message:lower() == "skip"

    if playerSaidSkip  --[[ and groupId > 0 ]] then
        frame.Visible = true
        wait(3)
        frame.Visible = false
    end
end)
0
I'll try this JustSxript 36 — 4y
0
kk let me know what happens royaltoe 5144 — 4y
0
we can team create if it doesnt work, pls don't give up!! royaltoe 5144 — 4y
0
I'll send you the whole script on roblox. JustSxript 36 — 4y
Ad
Log in to vote
0
Answered by
Techyfied 114
4 years ago
Edited 4 years ago

Maybe the line space are not organised? After if group id > 0 then, the lines must be positioned under the groupid. It might look like it

    Player.Chatted:connect(function(message)
        if message:lower() == "skip" then
            if groupId > 0 then
                  game.StarterGui.NoPerms.Frame.Visible = true
                  wait(3)
                  game.StarterGui.NoPerms.Frame.Visible = false

I'm not sure about it.

0
The group thing works fine. It does print things in the console if I try to do that. JustSxript 36 — 4y
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Try this:


Player.Chatted:connect(function(message) local screen = Script.Parent.Parent.NoPerms.Frame -- change this to your screen gui and dont use game.parent! if message:lower() == "skip" then if groupId > 0 then screen.Visible = true wait(3) screen.Visible = false

I hope this solved your issue.

0
I'll thy this. JustSxript 36 — 4y
0
There is a problem. The script gets executed in the console so not inside the startergui JustSxript 36 — 4y
0
workspace, not console lol JustSxript 36 — 4y
0
Oof, then I dont know. isaacjh100 41 — 4y
0
Thats fine JustSxript 36 — 4y

Answer this question