Fennict
|
  |
| Joined: 11 Jul 2014 |
| Total Posts: 30 |
|
|
| 17 Oct 2017 04:08 PM |
In studio, I am trying to create a script where when you kill the dummy, the value 'EXP' on the leaderboard goes up. Here's the script I'm dealing with: player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then player.EXP.Value = player.EXP.Value + 35 end end end) end) end)
For some reason, the last end) comes up with an error. I tried fixing it, but with no luck.Could someone please help me fix my script so it increases the EXP Value? |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2017 04:17 PM |
| On the third end you don't need a bracket |
|
|
| Report Abuse |
|
|
Fennict
|
  |
| Joined: 11 Jul 2014 |
| Total Posts: 30 |
|
|
| 17 Oct 2017 04:35 PM |
| /\ Then that makes the fouth end get under striked, with the words "Expected ')' to close '(' at line 2), got 'end' |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2017 04:37 PM |
player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then player.EXP.Value = player.EXP.Value + 35 end end end) end)
Ok here do this |
|
|
| Report Abuse |
|
|
Fennict
|
  |
| Joined: 11 Jul 2014 |
| Total Posts: 30 |
|
|
| 17 Oct 2017 04:55 PM |
| ^ Typed in but still doesn't work. (it also says that whenever you typed "player" it came up as an unknown player) |
|
|
| Report Abuse |
|
|