|
| 29 Oct 2014 09:29 PM |
So I'm trying to make a gui that gives pp everytime it's clicked but it isn't working. First a script is put into the player though. Here's the 2 scripts. ---------------------------------------------------------------- function ledurburd(playur) local ledurstatts = Instance.new("Model", playur) ledurstatts.Name = "leaderstats" local pp = Instance.new("IntValue", ledurstatts) pp.Name = "Points" pp.Value = 0 ------------------------------------------ --cloning pp awarding script! local app = script.AwardPP:clone() app.Parent = playur app.Disabled = false end
game.Players.PlayerAdded:connect(ledurburd) ---------------------------------------------------------------- and the second one
local pp = 1 function awardPP() local playur = script.Parent pps:AwardPoints(playur.userId, pp) end
script.Parent.leaderstats.Points.Value.Changed:connect(awardPP) |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
| |
|
|
| 29 Oct 2014 09:43 PM |
Oh yeah. Well I changed that but it still isn't working for some reason. Here's the new 2nd script. --------------------------------------------- local pp = 1 function awardPP() local playur = script.Parent local pps = game:GetService("PointsService") pps:AwardPoints(playur.userId, pp) end
script.Parent.leaderstats.Points.Value.Changed:connect(awardPP) ------------------------------------------------- Please help! |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 29 Oct 2014 09:46 PM |
| What stuff is a script and what stuff is a LocalScript? |
|
|
| Report Abuse |
|
|
|
| 29 Oct 2014 09:47 PM |
Both are normal scripts. I'm guessing that's a problem considering you asked?
~I like trees |
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
| |
|
|
| 29 Oct 2014 09:54 PM |
Oh. Okay then. Thanks for trying to help! :D
|
|
|
| Report Abuse |
|
|
Procellus
|
  |
| Joined: 28 Oct 2014 |
| Total Posts: 1525 |
|
|
| 29 Oct 2014 09:57 PM |
"script.Parent.leaderstats.Points.Value.Changed:connect(awardPP)"
script.Parent.leaderstats.Points.Changed:connect(awardPP) |
|
|
| Report Abuse |
|
|
| |
|
Amexurous
|
  |
| Joined: 28 Jan 2014 |
| Total Posts: 324 |
|
|
| 30 Oct 2014 12:03 AM |
| @Procellus, you can't used changed on a property. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 30 Oct 2014 12:39 AM |
'@Procellus, you can't used changed on a property.' Thats probably why he told OP to change it so it doesn't try to do that |
|
|
| Report Abuse |
|
|