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: Need a fix

Previous Thread :: Next Thread 
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
17 Feb 2014 11:10 AM
Can someone tell me what I did do wrong?
The fault probably just is a typo..

function onClicked()
if Player:IsInGroup(1018818) and Player:GetRankInGroup(1018818) > 1 then

local Model = game.Lighting.Whistle
wait()
local ModelCopy = Model:Clone()
ModelCopy.Parent = Player.BackPack

script.Parent.ClickDetector.MouseClick:connect()

end
end
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
17 Feb 2014 11:13 AM
function onClicked(Player)
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
17 Feb 2014 11:23 AM
It didn't work
Report Abuse
Spectrabox is not online. Spectrabox
Joined: 29 Aug 2008
Total Posts: 6888
17 Feb 2014 11:24 AM
What does the output say?
Report Abuse
Zomebody is not online. Zomebody
Joined: 01 Jun 2010
Total Posts: 789
17 Feb 2014 11:24 AM
script.Parent.ClickDetector.MouseClick:connect()

That doesn't connect to anywhere. Replace it with this:

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
17 Feb 2014 11:25 AM
yeah do both my fix and Zome's
Report Abuse
Tkdriverx is not online. Tkdriverx
Joined: 27 May 2008
Total Posts: 235
17 Feb 2014 11:27 AM
function onClicked(Player)
if Player:IsInGroup(1018818) and Player:GetRankInGroup(1018818) > 1 then

local Model = game.Lighting.Whistle
wait()
local ModelCopy = Model:Clone()
ModelCopy.Parent = Player.BackPack
end
end

script.Parent.ClickDetector.MouseClick:connect(OnClicked)
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
17 Feb 2014 11:37 AM
Thanks! It worked
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
17 Feb 2014 11:45 AM
It didn't* ;d
Report Abuse
booz22 is not online. booz22
Joined: 24 Mar 2012
Total Posts: 21
17 Feb 2014 11:52 AM
function onClicked(LocalPlayer)
if Player:IsInGroup(1018818) and Player:GetRankInGroup(1018818) > 1 then
local Model = game.Lighting.Whistle
wait()
local ModelCopy = Model:Clone()
ModelCopy.Parent = Player.BackPack
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

try above
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
17 Feb 2014 12:27 PM
Still didn't work..
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
17 Feb 2014 12:31 PM
function onClicked(plr)
if plr:IsInGroup(1018818) and plr:GetRankInGroup(1018818) > 1 then
local mdl = game.Lighting.Whistle
wait()
local mdlcpy = mdl:Clone()
mdlcpy.Parent = plr.Backpack
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


--also, I would recommend placing "Whistle" into ServerStorage; more secure than Lighting
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