Script not printing anything

hey, im making a game currently where people can claim and change their booths. but for some reasons, In this script it is not printing the the booths position when it should. this is my full script:

script.Parent.ProximityPrompt.Triggered:Connect(function(player)
	local boothOwner = script.Parent.Parent.Owner.Value
	if boothOwner == "Noone" or boothOwner == player.Name then
		if not player:FindFirstChild("OwnsBooth") then
			script.Parent.Parent.Owner.Value = player.Name
			script.Parent.Parent.Base.SurfaceGui.TextLabel.Text = "Owned By: " .. player.Name
			script.Parent.ProximityPrompt.ActionText = "Edit Booth"

			local tag = Instance.new("BoolValue")
			tag.Name = "OwnsBooth"
			tag.Parent = player

			if boothOwner == player.Name then
				local boothName = "Booth1"
				local boothPosition = script.Parent.Parent.Select
				print("Booth position:", boothPosition)
				game.ReplicatedStorage.ChangeBooth:FireServer(player, boothName, boothPosition)
			end
		end

		game.ReplicatedStorage.BoothTextGui:FireClient(player)
	else
		warn("You do not own this booth.")
	end
end)

this is the specific part which should be printing:

			if boothOwner == player.Name then
				local boothName = "Booth1"
				local boothPosition = script.Parent.Parent.Select
				print("Booth position:", boothPosition)
				game.ReplicatedStorage.ChangeBooth:FireServer(player, boothName, boothPosition)
			end

For some reason, getting a value is always wonky for me. Try changing these lines to these new lines:

local boothOwner = script.Parent.Parent.Owner

and:

if boothOwner.Value == player.Name then

Hope this helps :smile:

1 Like

aw what da heck thats so weird, worked for me though, thanks! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.