|
| 05 Aug 2015 11:34 PM |
local Part = script.Parent local Leaderboard = Instance.new("IntValue") local Score = Instance.new("IntValue") function onEnter(Player) Leaderboard.Name = "leaderstats" Score.Name = "Score" Score.Value = 0 Leaderboard.Parent = Player Score.Value = Leaderboard end
function onTouch(Brick) local Player = Brick.Parent:findFirstChild("Humanoid") if (Player ~= nil)then local Location = game:GetService('Players'):GetPlayerFromCharacter(Player.Parent) Scores.Value = Scores.Value + 1 end end
It gives me an error on the Scores.Value = Scores.Value + 1 line
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 11:40 PM |
have two different scripts.. one in workspace, one in brick -- try this leaderboard;
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local mins = Instance.new("IntValue") mins.Name = "Credits" -- Whatever your currency is called mins.Value = 0
mins.Parent = stats stats.Parent = newPlayer
while true do wait(121) -- How long it takes you to get (x) money mins.Value = mins.Value + 100 --- How much money you want over (x) time end end
game.Players.ChildAdded:connect(onPlayerEntered)
-- Acrobatically
-----
What's the error say?
"I'm going to become a employee at mcdonalds for my career :)" - ISOLAYTOR/YShaarj |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 11:48 PM |
error is
Frame 0
What Lua
FunctionName onTouch
Line No 19
Source Workspace.Part.Script
Function Explanation global
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
DogeKip
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 6860 |
|
|
| 05 Aug 2015 11:50 PM |
It is: local Player = Brick.Parent:FindFirstChild("Humanoid") Roblox is very inconsistent with capitalization, you need the capital F
On and on south of heaven | Previously: awesom914 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 12:01 AM |
"Roblox is very inconsistent with capitalization, you need the capital F"
huh
well it still broke
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
DogeKip
|
  |
| Joined: 06 Mar 2011 |
| Total Posts: 6860 |
|
|
| 06 Aug 2015 12:23 AM |
Oh, it should be Score.Value instead of Scores.Value
On and on south of heaven | Previously: awesom914 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 12:42 AM |
well it isn't breaking anymore but it also isn't displaying a random number on the leaderboard
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 12:43 AM |
| You didnt even parent the values |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 12:46 AM |
"You didnt even parent the values"
what values should I have parented
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 03:01 PM |
bump
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 03:28 PM |
bump2
http://www.roblox.com/Purple-Valkyrie-Helm-item?id=229707861 |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 03:36 PM |
| I think it is scores.value.parent... |
|
|
| Report Abuse |
|
|