It's supposed to make who ever writes "!jumpscare" have a Gui pop up but it does nothing (no errors in output) i need help making it understand what i mean by player with the PlayerAdded thing but idk how to implement it, this is a local script.
local Players = game:GetService("Players")
local playCommand = "!jumpscare"
local Gui = game:GetService("StarterGui").ScreenGui.fgaaimage
local function onPlayerAdded(player)
print("player has been added")
end
local function onPlayerChatted(player, message)
if message:sub(1, playCommand:len()):lower() == playCommand then
Gui.Visible = true
wait(10)
Gui.Visible = false
end
end
player.Chatted:Connect(function(message, _recipient)
onPlayerChatted(player, message)
end)
Players.PlayerAdded:Connect(onPlayerAdded)
** You are now Level 1! **