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
 

I'm just trying to learn from responses.

Previous Thread :: Next Thread 
Virtuex is not online. Virtuex
Joined: 23 Mar 2011
Total Posts: 4056
19 Jun 2012 06:03 PM
So, my attempt at the Gui brick completely failed. But, here's what I will try to do. I want this brick to give you something from the Lighting. But it also cost Money or KOs, whatever. It also changes speed.

function onTouched(Part)
b = game.Workspace.FunctionPart -- changeable name
s = game.Workspace.Player.Walskpeed
if game.Workspace.Player.LeaderBoard.KOs = <100 then do
break but
if game.Workspace.Player.LeaderBoard.KOs = >99 then do
if b.Connect["Humanoid"] then
s = 50
and
if b.Connect["Humanoid"] then
game.Workspace.Player.Starterpack.Add
game.Lighting.ToolName
end
end
end
end
end

Hit.connect()
Report Abuse
Lostisdead is online. Lostisdead
Joined: 18 Jun 2010
Total Posts: 2262
19 Jun 2012 06:15 PM
i hope you notice theres a typo at game.Workspace.Player.*Walkspeed*
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Jun 2012 06:23 PM
Ok... I'm going to try...

Edit the top variables to suit your needs.

    price = 100
    speed = 50
    item = "ToolName"
    
    function onTouched(Part)
    if Part.Parent and Part.Parent:FindFirstChild("Humanoid") then
    local p = Game.Players:GetPlayerFromCharacter(Part.Parent)
    if p.leaderstats.KOs.Value ​>= price then
    p.leaderstats.KOs.Value = p.leaderstats.KOs.Value - price
    Game.Lighting[ToolName]:Clone().Parent = p.Backpack
    Part.Parent.Humanoid.WalkSpeed = speed
    end
    end
    end
    
    script.Parent.Touched:connect(onTouched)

† KMXD †
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