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 » Scripting Helpers
Home Search
 

Re: Help 2 Bits:

Previous Thread :: Next Thread 
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 02:33 PM
game:GetService("Players").PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
local Key,Error = pcall(function()
return Player:LoadNumber("Pin")
end) end)

game:GetService("Players").PlayerAdded:connect(function(Player)
Player.Pin.Changed:connect(function()
Player:SaveNumber("Pin", Player.Pin.Value)


end) end)

--The number doesn't save/load

local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if reg.User.Active == true and key:byte() == 13 then
b=plr.Pin b.Value = reg.User.Text reg.Visible = false start.Visible = true
end end) --It doesn't make start visible
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 02:44 PM
Bump... OutPut for Data persistence:

Pin is not a valid member of player
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 02:50 PM
Bump.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 02:56 PM
Bump/
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 03:11 PM
Here is the full version of the 2nd script:

local plr = game.Players.LocalPlayer
gui = plr.PlayerGui.Pass
start = gui.Start
ar = gui.ar
reg = gui.Reg
bay = gui.bay
te = gui.Fra
arr = gui.arr
w = plr.Correct
----------------
start.reg.MouseButton1Down:connect(function()
if plr.Pin.Value == 0 then
start.Visible = false
ar.Visible = true
else bay.Visible = true start.Visible = false
end end)

ar.No.MouseButton1Down:connect(function()
ar.Visible = false
start.Visible = true
end)

ar.Yes.MouseButton1Down:connect(function()
if start.reg.Selected == true then
reg.Visible = true ar.Visible = false
reg.User.Active = true

end end)

bay.Go.MouseButton1Down:connect(function()
start.Visible=true bay.Visible=false

end)

local mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if reg.User.Active == true and key:byte() == 13 then
b=plr.Pin b.Value = reg.User.Text reg.Visible = false start.Visible = true reg.User.Active = false
end end)

start.log.MouseButton1Down:connect(function()
if plr.Pin == 0 then
arr.Visible = true start.Visible = false
else te.Visible = true start.Visible = false te.T.Active = true
end end)


mouse.KeyDown:connect(function(key)

b = plr.Pin

if te.T.Active == true and key:byte() == 13 then
w.Value = te.T.Text
if te.T.Active == true and w.Value == b.Value and key:byte() == 13 then
gui:Destroy()
elseif key:byte() == 13 and te.T.Active == true and b.Value > w.Value or b.Value < w.Value and te:FindFirstChild("WW") == nil then
s = Instance.new("TextLabel", te)
s.Name = "WW"
s.TextColor3 = Color3.new(1,1,1)
s:TweenPosition(UDim2.new(0, 160, 0, 100),"In", "Quad", 3, true)--Tweeing
s:TweenSize(UDim2.new(0, 200, 0, 20), "In", "Quad", 3, true) --Tweening
s.BackgroundColor3 = Color3.new(206/206,0/0,0/0)
s.Text = "Error: Wrong Pin"
s.Font = "ArialBold"
s.FontSize="Size24"
elseif key:byte() == 13 and te.T.Active == true and b.Value > w.Value or b.Value < w.Value and te:FindFirstChild("WW") then
s = te.WW
s:Destroy()
wait(.1)
r = Instance.new("TextLabel", te)
r.Name = "WW"
r.TextColor3 = Color3.new(1,1,1)
r:TweenPosition(UDim2.new(0, 160, 0, 100),"In", "Quad", 3, true)--Tweeing
r:TweenSize(UDim2.new(0, 200, 0, 20), "In", "Quad", 3, true) --Tweening
r.BackgroundColor3 = Color3.new(206/206,0/0,0/0)
r.Text = "Error: Wrong Pin"
r.Font = "ArialBold"
r.FontSize="Size24"
end end end)

--It only works completely in solo...
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
22 Apr 2013 03:40 PM
BUMP
Report Abuse
YellowBrick1 is not online. YellowBrick1
Joined: 06 May 2009
Total Posts: 865
22 Apr 2013 04:57 PM
Bump (Why am I bumping this?)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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