generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why wont this work?

Previous Thread :: Next Thread 
Bitwyl is not online. 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
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
14 Mar 2015 05:58 PM
connection for the hit function?


those four years of wumbology are really paying off
Report Abuse
Bitwyl is not online. Bitwyl
Joined: 15 Nov 2014
Total Posts: 7276
14 Mar 2015 06:07 PM
what
Report Abuse
Bitwyl is not online. Bitwyl
Joined: 15 Nov 2014
Total Posts: 7276
14 Mar 2015 06:19 PM
b1

please help
Report Abuse
Bitwyl is not online. Bitwyl
Joined: 15 Nov 2014
Total Posts: 7276
14 Mar 2015 06:31 PM
b2

Please help
Report Abuse
Bitwyl is not online. Bitwyl
Joined: 15 Nov 2014
Total Posts: 7276
14 Mar 2015 06:35 PM
B3

Please help
Report Abuse
Bitwyl is not online. Bitwyl
Joined: 15 Nov 2014
Total Posts: 7276
14 Mar 2015 06:53 PM
b4

Please help
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
14 Mar 2015 06:58 PM
Bumps are for the impatient weak people.
Report Abuse
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
14 Mar 2015 07:15 PM
@ohno1112

go away now, please.


those four years of wumbology are really paying off
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image