Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Quest system allows to keep peforming quest?

Asked by 6 years ago

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

Answer this question