Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
|
| 14 Mar 2015 05:52 PM |
I have a save/load script, and the part that isn't working is when a player touches a certain part (they are numbered 1-50) then whichever number they step on changes their stage to that number. Here's the leaderboard: function oa(object) local player = game.Players:playerFromCharacter(object) if player ~= nil then local ls = player.leaderstats local sl = game.Workspace:FindFirstChild(ls.Stage.Value) print("gah") object.Torso.CFrame = object.Torso.CFrame + Vector3.new(0,3,0) wait() object.Torso.CFrame = sl.CFrame + Vector3.new(0,3,0) end end
function oe(object) if object.className == "Player" then local ack = Instance.new("IntValue") ack.Name = "leaderstats" local ack2 = Instance.new("IntValue") ack2.Name = "Stage" ack2.Value = 1 ack2.Parent = ack ack.Parent = object end end
game.Players.ChildAdded:connect(oe) game.Workspace.ChildAdded:connect(oa) ------------------------------------------------------ Here's the script that's inside the numbered parts:
function ot(hit) if hit.Parent ~= nil then local player = game.Players:playerFromCharacter(hit.Parent) if player ~= nil then if player.leaderstats.Stage.Value == script.Parent.Name - 1 then local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil then if h.Health ~= 0 then player.leaderstats.Stage.Value = script.Parent.Name end end end end end end
|
|
|
| Report Abuse |
|
|
|
| 14 Mar 2015 05:58 PM |
connection for the hit function?
those four years of wumbology are really paying off |
|
|
| Report Abuse |
|
|
Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
| |
|
Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
| |
|
Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
| |
|
Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
| |
|
Bitwyl
|
  |
| Joined: 15 Nov 2014 |
| Total Posts: 7276 |
|
| |
|
ohno1112
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 833 |
|
|
| 14 Mar 2015 06:58 PM |
| Bumps are for the impatient weak people. |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2015 07:15 PM |
@ohno1112
go away now, please.
those four years of wumbology are really paying off |
|
|
| Report Abuse |
|
|