#/e command

43 messages · Page 1 of 1 (latest)

prime venture
#

Please help, its not working

game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        message = string.lower(message)

        if message == "/e open" then
            game.StarterGui.ScreenGui.Enabled = true
        end
    end)
end)
#

its supposed to open a screengui admin panel

#

can anyone tell me the problem

lapis socket
#

Why do you need for it be a messge in chat?

prime venture
#

to be cool

lapis socket
#

But is it completly neccesary?

#

what game are you trying to make?

prime venture
#

its a demon slayer game, but i want admin commands for my game so i can have fun trolling players

lapis socket
#

Dont focus on admin commands when your game isnt even near complete

prime venture
#

it is complete

lapis socket
#

its fully complete?

prime venture
#

ye

lapis socket
prime venture
#

bruh

#

can u say what's the problem in the script

lapis socket
#

Im using prompts for now

#

and click detectors

prime venture
#

bruuh

#
game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        message = string.lower(message)

        if message == "/e open" then
            game.StarterGui.ScreenGui.Enabled = true
        end
    end)
end)

i want to know whats wrong here 😭

lapis socket
#

oh i might know lmao

#

do this

#

game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
message = string.lower(message)

    if message == [ "/e open"] then
        game.StarterGui.ScreenGui.Enabled = true
    end
end)

end)

#

it might fdo

#

do it

turbid swift
#

Your first script was almost correctly done

#

The problem is game.PlayerGui is not visible for the player

#

That's just some sort of template

#

We all make this mistake 🙂

#

What's actually visible on the player is duplicated from there

#

It's called "PlayerGui" and it's in the player

#

So here's what to do:

#

You already have the player in the PlayerAdded as the parameter

#

Now, instead of using game.StarterGui, use player.PlayerGui

#

Now, you won't ever make this mistake again!

prime venture
#

thx

#

i also learned from this my mistakes in the script

#

its not game.startergui.screengui

#

it shoudl be playergui instead

turbid swift
#

Exactly

#

It works now by the way, right?

prime venture
#

yes