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
Is your game filtering enabled?
Yes
so, script.quest2.Value is equal to the quest name?
Your idea might work(the if statement)
Another problem is that you rely on values. This isn't good security wise because an exploiter could change the values
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
StringValue or just a variable that stores a string
By the way, have you used remotes?
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?
You would place the if statement in between line 3 through 5( if player.Quest2.Value == "-[None]" then -- code)
No I'm not familiar with remotes
You should use RemoteEvents and RemoteFunctions or else your code won't work in an actual game
It might work, but, it won't be how you intend it to be
Here is the documentation of Remote Events and Remote Functions https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events