I have this quest system with a gui and it functions fine but the player can keep doing the quest even if it has been completed. Theres a gui on the bottom left which says "-[NONE]" until a quest has been activated. So theres a block and when I touch it then the NONE would change to the value I put in for the quest(for example: Retrieve the boot). There is also a finish block to complete the quest rewarding the player and this causes the gui to change to "-[Compelted]." I only want the quest to start if the gui says "-[NONE]" so the player can't keep doing the quest giving them an ongoing reward. I tried using an if statement like: if player.Quest2.Value == "-[NONE]" then ... but I'm not sure where this would go and if this is the proper command to use. I'm a beginner and this so if what I'm doing wrong is obvious I'm sorry.

Quest Activator:

script.Parent.Touched:connect(function(k)
	if k and k.Parent.Humanoid then
		game.Players[k.Parent.Name].Quest2.Value = script.quest2.Value
		wait(3)
		end
end)

14 comments

0

Is your game filtering enabled?

0

Yes

0

so, script.quest2.Value is equal to the quest name?

0

Your idea might work(the if statement)

0

Another problem is that you rely on values. This isn't good security wise because an exploiter could change the values

0

Yeah theres a value inside the script which is where the quest name is. So that piece is basically directing the script to change the "-[NONE]" to what is put in the value

0

StringValue or just a variable that stores a string

0

By the way, have you used remotes?

0

So if the idea could work, am I doing it right? Like is the code fine and if so then where would I place it?

0

You would place the if statement in between line 3 through 5( if player.Quest2.Value == "-[None]" then -- code)

0

No I'm not familiar with remotes

0

You should use RemoteEvents and RemoteFunctions or else your code won't work in an actual game

0

It might work, but, it won't be how you intend it to be

0

Here is the documentation of Remote Events and Remote Functions https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events