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
 

Can someone fix this?

Previous Thread :: Next Thread 
coolhighpower is not online. coolhighpower
Joined: 28 Jun 2011
Total Posts: 214
26 Aug 2013 03:55 PM
Script:

local TOOL = Game:GetService("Lighting").Detnator

local Player = Game:GetService("Players").LocalPlayer
local Back = Player:WaitForChild("Backpack")
local Character = Player.Character

script.Parent.Equipped:connect(function()
local Mouse = Player:GetMouse()
Mouse.Button1Down:connect(function()
if Character and not Back:FindFirstChild(TOOL.Name) and not Character:FindFirstChild(TOOL.Name) then
TOOL:Clone().Parent = Character
end
end)
end)

Problem:

Well the problem is that I go into studio and then go into the test and it works fine but then when I acually play the game where it's in it's broken

Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
26 Aug 2013 04:09 PM
With LocalScripts sometimes you have to call wait at the top of your script because some instances like LocalPlayer take a while to initialize.

postCount = postCount + Roblox.Users.epicfail22.postCount;
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