So how do I make a script were each 15 mins it awards a player 1 points? & the limit is 140 for each player & only certain ranks can earn points.
I'm going to assume you mean ingame points, not playerpoints.
So first you'd have to set up a localscript inside StarterScripts. In this you'd have to add a leaderstats model and an intValue to store the points in.
local leaderstats = Instance.new("Model", script.Parent.Parent) leaderstats.Name = "leaderstats" local points = Instance.new("IntValue", leaderstats) points.Name = "Whatever you want"
You would then simply add a timer to increase the amount of points by one, up to a limit.
while true do wait(54000) --This is fifteen minutes in seconds. if point.Value < 140 then points.Value = point.Value+1 end end
To check a group rank then you would have to use GetRankInGroup to check the player's rank id, or you could have an ingame rank using another value.
while true do wait(54000) --This is fifteen minutes in seconds. if point.Value < 140 then if script.Parent:GetRankInGroup(551356)>=7 then points.Value = point.Value+1 end end end
http://wiki.roblox.com/index.php?title=API:Class/Player/GetRankInGroup
To use an ingame rank you'd have to add a StringValue into leaderstats named "Rank", and set the value to the rank name, ****or**** you could add another IntValue and set it to a numerical rank.
while true do wait(54000) --This is fifteen minutes in seconds. if point.Value < 140 then if leaderstats.Rank == WhateverRankYou'reUsing then points.Value = point.Value+1 end end end
Please don't copy and paste this, at least copy it out by hand. Or better, read it, understand it, close the tab and write your own version. That's the best way to learn.
Thank you and your welcome, goodnight.