Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

am trying to make a Value equal a player name so it can do a certain function can anyone help?

script.Parent.Union.ClickDetector.MouseClick:connect(function(player)
	if game.ReplicatedStorage.Name.Value == player.Name then
		print("Hello")
	else
		print("Na")
	end
end)

6 comments

1

Explain better! What do you exactly need?

0

As you see ever time it saws Na when i out the name in value is there why it's not working?

0

put a print after line 1 like this; print(player.Name) and see what it prints

0

it says Player1 and I put that in the String Value so why is it not working?

0

Is there any error?

0

There is no error

1 answer

✓ Accepted answer

change Name in ReplictedStorage to something else and in the script and it'll work

proof here

This discussion is preserved as it was. New answers, comments, and votes are closed.