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
 

function not being returned to?

Previous Thread :: Next Thread 
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
29 Apr 2014 06:34 PM
It seems I forgot how to properly return to a function, again. lol

function KeyDown(Key)
local KeyPressed = Key:lower()
if KeyPressed == "f" then
if ItemEquipped == false then
EquippItem() --The function
end
end
end

Mouse.KeyDown:connect(KeyDown)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
29 Apr 2014 06:34 PM
and if you need the function's code:

function EquippItem()
GetItemUsing()
if NumTorches.Value < 1 then
NowUsing = "None"
print "Out of Torches"
Ocupied = true
script.Error.RunOut.Visible = true
script.Error.RunOut:TweenPosition(UDim2.new(0.5,0,0.75,0),"Out","Quad",4)
for i=1, 60/4 do --Total Lazyness
script.Error.RunOut.TextTransparency = (script.Error.RunOut.TextTransparency + (60/4)/10) --Even Lazier
end
script.Error.RunOut.Visible = false
script.Error.RunOut.TextTransparency = 0
script.Error.RunOut.Position = UDim2.new(0.5,0,0.85,0)
Ocupied = false
elseif NumTorches > 1 then
if Ocupied == false then
if NowUsing == "None" then
print "Nothing to equipp"
Ocupied = true
script.Error.RunOut.Visible = true
script.Error.RunOut:TweenPosition(UDim2.new(0.5,0,0.75,0),"Out","Quad",4)
for i=1, 60/4 do --Total Lazyness
script.Error.RunOut.TextTransparency = (script.Error.RunOut.TextTransparency + (60/4)/10) --Even Lazier
end
script.Error.RunOut.Visible = false
script.Error.RunOut.TextTransparency = 0
script.Error.RunOut.Position = UDim2.new(0.5,0,0.85,0)
Ocupied = false
elseif NowUsing == "Torch" then
TorchW = Instance.new("Weld")
TorchW.Part0 = game.Players.LocalPlayer.Character.Torso
TorchMod = game.ReplicatedStorage.TorchModel:clone()
TorchW.Part1 = TorchMod
TorchW.Parent = TorchMod.Arm
TorchW.C0 = CFrame.new(-1,0,0)*CFrame.fromEulerAnglesXYZ(0,0,0)
game.Players.LocalPlayer.CameraMode = "Classic"
end
end
end
end
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
29 Apr 2014 06:45 PM
I'm assuming all of this is TL;DR.
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