Who is the TextLabel which I am trying to change text on. When I first load the game, It will not show Who, after I press a button to reload the GUI, it appears but only shows its original text, which is a period.

you will need to view the source if you can

local passIdg = 9215890
local passIdh = 9289382
local passIdi = 9498562
local passIdj = 9513041
local passIdk = 9516667

local player = game.Players.LocalPlayer
local haspassG = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passIdg)
local haspassH = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passIdh)
local haspassI = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passIdi)
local haspassJ = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passIdj)
local haspassK = MarketplaceService:UserOwnsGamePassAsync(player.UserId, passIdk)

game.Players.PlayerAdded:Connect(function(player)
	player:WaitForDataReady()
	if not (haspassG or haspassK or haspassH or haspassI or haspassJ) then
		return
	end
	player.PlayerGui.GiveDie.Who.Visible = true
	if haspassG and haspassH and haspassI and haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give all the dice to?"
	if haspassG then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the extra standard die to?"
	if haspassH then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the extra multiplier die to?"
	if haspassI then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the 20 sided die to?"
	if haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the 20 sided multiplier die to?"
	if haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a personal die to?"
	if haspassG and haspassH then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a standard and multiplier die to?"
	if haspassG and haspassI then
		player.PlayerGui.GiveDie.Text = "Who will you give the standard and standard 20 sided die to?"
	if haspassG and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a standard die and a 20 sided multiplier to?"
	if haspassG and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a standard die and a personal die to?"
	if haspassH and haspassI then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a multiplier and 20 sided die to?"
	if haspassH and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a multiplier and 20 sided multiplier die to?"
	if haspassH and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a multiplier and personal die to?"
	if haspassI and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a 20 sided and 20 sided multiplier die to?"
	if haspassI and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a 20 sided and personal die to?"
	if haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give a 20 sided multiplier and personal die to?"
	if haspassG and haspassH and haspassI then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the standard, multiplier and 20 sided die to?"
	if haspassG and haspassH and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the standard, multiplier and 20 sided multiplier die to?"
	if haspassG and haspassH and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the standard, multiplier and personal die to?"
	if haspassH and haspassI and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the multiplier, 20 sided and 20 sided multiplier die to?"
	if haspassH and haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the multiplier, 20 sided and personal die to?"
	if haspassI and haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the 20 sided, 20 sided multiplier and personal die to?"
	if haspassG and haspassH and haspassI and haspassJ then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the standard, multiplier, 20 sided and 20 sided multiplier die to?"
	if haspassG and haspassH and haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the standard, multiplier, 20 sided multiplier and personal die to?"
	if haspassH and haspassI and haspassJ and haspassK then
		player.PlayerGui.GiveDie.Who.Text = "Who will you give the multiplier, 20 sided, 20 sided multiplier and personal die to?"
     else
		print(player.Name .. " does not own a give a die pass.")
																									end
																								end
																							end
																						end
																					end
																				end
																			end
																		end
																	end
																end
															end
														end
													end
												end
											end
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
end)

What I wanted this script to do is: display different texts for different possiblities of owned gamepasses.

2 comments

0

use remote events instead

0

how