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

Script does not give points? [closed]

Asked by 11 years ago

This question already has an answer here:

Script does not give points?

This script is supposed to give you 1000 points when you get 1000 points

01points = script.Parent.Parent.Parent.Parent.Parent.Parent.leaderstats.puntos
02player = script.Parent.Parent.Parent.Parent.Parent.Parent
03pointsgiver = "pointsgiver"
04missiondoneA = "missiondone2"
05 
06if points.Value > 1000 and script.Parent.PointsGiver.Value == true then
07    script.Parent.MissionDone.Value = true
08    points.Value = points.Value + 1000
09    script.Parent.PointsGiver.Value = false
10 
11    player:SaveBoolean(missiondoneA, player.PlayerGui.Objectiver.Frame.ScrollingFrame.Getpoints.MissionDone.Value)
12    player:SaveNumber(pointsgiver, player.leaderstats.puntos.Value)
13 
14end
15 
16if script.Parent.MissionDone.Value == true then
17    script.Parent.PointsGiver.Value = false
18end

everything works correctly, but when i get 1000 points it doesnt give me the points im supposed to get

0
Sir, please do not post your topic more than one time, and remain with your original topic. Thank you; https://scriptinghelpers.org/questions/6633/script-does-not-give-points M39a9am3R 3210 — 11y

Marked as Duplicate by M39a9am3R, TheeDeathCaster, and Articulating

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
war8989 35
11 years ago

You are checking if their points are greater than 1000, but not equal to 1000, simply change line 6 to:

1if points.Value >= 1000 and script.Parent.PointsGiver.Value == true then
Ad