Prompt wont fire multiple players

Hey devs, I’ve been working on a quest system for my game. It’s working very fine, but only for me and no one else, even if another player is alone in a server he cannot interact with it. I don’t even know why it’s doing that. Please tell me what could be wrong. Because like I said, it is working very very fine, but can only be prompted by me and no one else.

here is the code that fire when the prompt is fired by a player (Only show the text of the quest requirement):

prompt.Triggered:Connect(function(plr)
	if plr.PlrStats.Level.Value >= MinLvl.Value and plr.PlrInfo.ActiveQuest.Value == false then
		game.ReplicatedStorage.Quest.QuestStart:FireClient(plr)
		wait(.3)
		plr.PlrInfo.ActiveQuest.Value = true
		plr.PlrInfo.ActiveQuest.MobCount.Value = 0
		plr.PlrInfo.ActiveQuest.MobName.Value = MobName.Value
		plr.PlrInfo.ActiveQuest.Requirement.Value = MobRequirement.Value
		--Check End of the quest
		plr.PlrInfo.ActiveQuest.MobCount.Changed:Connect(function()
			if plr.PlrInfo.ActiveQuest.MobCount.Value >= MobRequirement.Value then
				game.ReplicatedStorage.Quest.QuestEnd:FireClient(plr, info)
				plr.PlrInfo.ActiveQuest.Value = false
				plr.PlrInfo.ActiveQuest.MobCount.Value = 0
				plr.PlrInfo.ActiveQuest.MobName.Value = " "
				plr.PlrInfo.ActiveQuest.Requirement.Value = 0
				--Give rewards
				plr.PlrStats.Money.Value += Money.Value
				plr.PlrStats.Level.Exp.Value += Money.Value
			end
		end)
	end
end)

Here is the localScript that’s fired by the script.

game.ReplicatedStorage.Quest.QuestStart.OnClientEvent:Connect(function()
	wait(.1)
	ActiveQuest.Changed:Connect(function()
		script.Parent.Frame.Visible = true
		wait(.2)
		CountText.Text = QuestCount.Value.."/"..QuestRequirements.Value
		MobNameText.Text = MobName.Value
	end)
	
	QuestCount.Changed:Connect(function()
		CountText.Text = QuestCount.Value.."/"..QuestRequirements.Value
	end)
	
	--END THE QUEST
	game.ReplicatedStorage.Quest.QuestEnd.OnClientEvent:Connect(function()
		wait(.1)
		CountText.Text = "0/0"
		MobNameText.Text = " "
		script.Parent.Frame.Visible = false
	end)
end)
1 Like

Can you show us the local script which is fired with “game.ReplicatedStorage.Quest.QuestStart” please?

1 Like

That only show the quest requirements to the client, the text. I’ll show it a bit later gotta get home first.

Actually on your prompt, there is nothing to prevent all players from taking the quest, which is weird when you say that it works only for you

Does it only work for you because you’re the first person to interact with the quest?
Have you tried if other players can interact with the quest first?

1 Like

No, I tested that but I still am the only one that can interact with it. No one else can.

@Boustifail and @jetape , I edited my first post by adding the local script if you want to look at it. But like I said, even if I join the game with my alt account and that i’m all alone in the server I cannot run it unless it is me that takes it.

You’ve ensured that your alt had the same level as your main account?

Did you try to take the quest with your alt first then your main after?

Yessir. I have some test dummy that can make me lvl max in an instant so no worries about my levels.

Yes, only main can collect the quest.

Is the prompt disabled for the others or you still can click it even if you don’t get the quest? also when you try it on studio simulation with 2 bots, the second bot get the quest on the PlayerGui? (maybe this is disabled idk)

You used the dummy for both accounts? The only thing I could see the issue is that values aren’t being properly adjusted from the dummy while the main account has levels set by scripts

1 Like

this line i guess:

if plr.PlrStats.Level.Value >= MinLvl.Value and plr.PlrInfo.ActiveQuest.Value == false then

still can interact with the prompt

The others has the “MinLvl.Value” when they try?

yes he have. I don’t know what to do, I might have to redo the whole quest system but let me check a quick look to the line U showed me

i have a test for you. Try this code and check which number prints and which one doesn’t prints:

prompt.Triggered:Connect(function(plr)
	print(0)
	if plr.PlrStats.Level.Value >= MinLvl.Value and plr.PlrInfo.ActiveQuest.Value == false then
		print(1)
		game.ReplicatedStorage.Quest.QuestStart:FireClient(plr)
		wait(.3)
		plr.PlrInfo.ActiveQuest.Value = true
		plr.PlrInfo.ActiveQuest.MobCount.Value = 0
		plr.PlrInfo.ActiveQuest.MobName.Value = MobName.Value
		plr.PlrInfo.ActiveQuest.Requirement.Value = MobRequirement.Value
		--Check End of the quest
		plr.PlrInfo.ActiveQuest.MobCount.Changed:Connect(function()
			print(2)
			if plr.PlrInfo.ActiveQuest.MobCount.Value >= MobRequirement.Value then
				print(3)
				game.ReplicatedStorage.Quest.QuestEnd:FireClient(plr, info)
				plr.PlrInfo.ActiveQuest.Value = false
				plr.PlrInfo.ActiveQuest.MobCount.Value = 0
				plr.PlrInfo.ActiveQuest.MobName.Value = " "
				plr.PlrInfo.ActiveQuest.Requirement.Value = 0
				--Give rewards
				plr.PlrStats.Money.Value += Money.Value
				plr.PlrStats.Level.Exp.Value += Money.Value
			end
		end)
	end
end)

I just corrected the line you told me to check and It now seems to work. In test mode, player1 and player2 can both pick up the quest, only thing I changed is the “>=” for just a “>”

alright test in game with your main and alt and tell me then