Gui is showing to all players

Hello, I scripted a gui that would show to each player individually, but it shows to everyone. I used a normal script:

game.Players.PlayerAdded:Connect(function(player)
local playerGui = player:WaitForChild("PlayerGui")

local function noTutorial(plr)
	local starterGui = script.TutorialGuis:Clone()
	starterGui.Parent = playerGui
end


game.ReplicatedStorage.Check.OnServerEvent:Connect(function(players)

	if players.doneTutorial.Value == "false" then
		noTutorial()
	else
		print('no')
	end

end)
end)

Make this script into a LocalScript

Can’t it’s connected to a remote event.

Use: click here
Or fire just on client

I would need a player object, but I don’t know what is the player object

1 Like

I tried Local Script but I messed up all of the script

1 Like

You have this conencted to a player added event, so you are doing it to everyone went the event is fired. Take it out of the player added and handle it in the remote event.

game.ReplicatedStorage.Check.OnServerEvent:Connect(function(player)
	if players.doneTutorial.Value == "false" then
		local starterGui = script.TutorialGuis:Clone()
		starterGui.Parent = player.PlayerGui
	else
		print('no')
	end
end)
1 Like

thanks :pray::pray: it now works how i wanted it to