PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
i need to have a brick so when another brick called "pin1" will touch it it will disapear and and a point to the leaderboard. i also need help making the leaderboard any help is appreciated.
{PC} |
|
|
1. Your Pin Point, sah.
function onTouched(part)
local pin = part.Parent
if pin.Name = pin1 then
pin:remove()
local h = game.Players:findFirstChild("Humanoid")
if h~=nil then
local thisplr = h.Parent:findFirstChild(h.Parent.Name)
if thisplr~=nil then
local stats = thisplr:findFirstChild("leaderstats")
if stats~=nil then
local score = stats:findFirstChild("InsertScoreNameHere")
if score~=nil then
score.Value = score.Value + 1
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched) |
|
|
2. Your ScoreBoard, sah!
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local score = Instance.new("IntValue")
score.Name = "Score Name Here"
score.Value = 0
mins.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
thanks waffle |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
UNITE FOR THE FIGHT!!! |
|
OkardJoin Date: 2007-03-13 Post Count: 3 |
? |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
the pin one ddnt work, and i also need it to remove base1 |
|
|
Send me the pin script the way you editted it. |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
i ddnt edit it, did i need to? |
|
|
...Yeah. Where it says ScoreNameHere. |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
i did that, Points |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
the leader doesnt either, can you give me the whole thing, anyone? |
|
|
Woops, sorry PC. I'm really bad at free-hand scripting. I'll fix up the first one, seeing you got the second one. |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
second one? |
|
|
|
hehe oops, wrong account! |
|
mikedJoin Date: 2006-11-15 Post Count: 430 |
^ hahahahahaha |
|
tottiJoin Date: 2006-11-02 Post Count: 2684 |
Lol now we all know your "secret" account =)
Totti |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
miked, can you stop laughing and mabey help? |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
hehe, please? |
|
|
function onTouched(part)
local pin = game.Workspace.MyPinHere
if pin.Name = pin1 then
local h = game.Players:findFirstChild("Humanoid")
if h~=nil then
local thisplr = h.Parent:findFirstChild(h.Parent.Name)
if thisplr~=nil then
local stats = thisplr:findFirstChild("leaderstats")
if stats~=nil then
local score = stats:findFirstChild("InsertScoreNameHere")
if score~=nil then
score.Value = score.Value + 1
pin:remove()
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched) |
|
|
Ack. Mispelled the third line.
function onTouched(part)
local pin = game.Workspace.MyPinHere
if pin.Name == pin1 then
local h = game.Players:findFirstChild("Humanoid")
if h~=nil then
local thisplr = h.Parent:findFirstChild(h.Parent.Name)
if thisplr~=nil then
local stats = thisplr:findFirstChild("leaderstats")
if stats~=nil then
local score = stats:findFirstChild("InsertScoreNameHere")
if score~=nil then
score.Value = score.Value + 1
pin:remove()
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched) |
|
|
print("Community Leaderboard script loaded")
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local score = Instance.new("IntValue")
score.Name = "InsertScoreNamehere"
score.Value = 0
score.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
thanks waffle, big help. ill go test them now, cross your fingers! |
|
PCwienerJoin Date: 2007-03-03 Post Count: 3746 |
hmm, the LB works but,
this is how i edited it, probly did sumtin wrong, and can you make it remove "base1" also? thx
function onTouched(part)
local pin = game.Workspace.removal
if pin.Name == Pin1 then
local h = game.Players:findFirstChild("Humanoid")
if h~=nil then
local thisplr = h.Parent:findFirstChild(h.Parent.Name)
if thisplr~=nil then
local stats = thisplr:findFirstChild("leaderstats")
if stats~=nil then
local score = stats:findFirstChild("Points")
if score~=nil then
score.Value = score.Value + 1
pin:remove()
end
end
end
end
end
end
script.Parent.Touched:connect(onTouched) |
|