If " " then else, not reading properly

no idea how to describe this

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    my if statement isnt working

  2. What is the issue? Include screenshots / videos if possible!
    ive made a remoteEvent that fires a player name, in the screenshot, when the remoteevent fires, it fires with my username. then if the string value matches my username it should print something but it isnt. (idk how to explain it ig)

  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    it only prints “works” if i manually set blindPlayer to my username (blindPlayer = “gunf3r”) but not if i keep it as “blindPlayer” from the remote event
    .
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

.
script to fire remote event (a localscript inside a button from starterGUI)

local player = game.Players.LocalPlayer
local repStorage = game:GetService("ReplicatedStorage")
local startGameEvent = repStorage:WaitForChild("gameStartEvent")
local button = script.Parent

button.MouseButton1Click:Connect(function()
	local blindPlayer = player
	startGameEvent:FireServer(blindPlayer)
end)

.
script that prints “works” if “blindPlayer” matches my username (“gunf3r”)

local startgameEvent = game.ReplicatedStorage:WaitForChild("gameStartEvent")
local player = game.Players.LocalPlayer

startgameEvent.OnServerEvent:Connect(function(blindplayer)
	local text = script.Parent.Value
	print(blindplayer)

if text.Value == blindplayer then
	print("works")
end

end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

i have no idea how to elaborate further but it simply doesnt print

thanks

You are comparing a string with a player object.
Use blindplayer.Name

Your also trying to get the local player on the server which doesn’t work.