The script mostly works. The part that is broken on my script is when I try to change a StringValue into the players name. the code seems to work to me. Any help?

game.ReplicatedStorage.LoadGameEvent.OnServerEvent:Connect(function(player, purid)
	print(player)
	if purid == "Plot1" then
		script.Parent.Plot1.Owner.Value = player--//I have tried player.Name
	elseif purid == "Plot2" then
		--//add code here after Plot1 works.
	end
end)

Any Help would be nice. Thanks!

2 comments

0

is script.Parent.Plot1.Owner a StringValue? And can you show me the local script what is firing the game.ReplicatedStorage.LoadGameEvent ? I need to know if player is the player, or it's the player's name. If the player is actually the player, and purid is Plot1, you should use player.Name instead of player.

0

Sorry... I just realized the error. Thanks for helping though.