Here is the LocalScript located inside of a button
script.Parent.MouseButton1Click:Connect(function()
local owner = "Player"
player = game.Players.LocalPlayer.Name
game.ReplicatedStorage.RemoteEvent:FireServer()
print("remote fired!")
print(player)
end)
The script triggers a RemoteEvent which connects to a script in ServerScriptService, telling the Tutorial GUI to close.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
print("Close button loaded")
button = game.Players.player.PlayerGui.Tutorial.Intro.No
window = game.Players.player.PlayerGui.Tutorial
function onClicked(GUI)
window:remove()
end
game.Players.player.PlayerGui.Tutorial.Intro.No.MouseButton1Click:connect(onClicked)
end)
However I get this error when I press the button:
player is not a valid member of Players
Here is where the error is located:
button = game.Players.player.PlayerGui.Tutorial.Intro.No
So I guess the variable can't be placed in a script that way? When I tried replacing "player" with my own username it worked. There's something wrong I did with the variables.

2 comments
Hi. The reason your code isnt working is well because you stated that player which isnt localized into a string value. At the top of where owner is change owner to local owner = game.players.localplayer.Name
^ the comment above mine is incorrect. Ignore it.