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: This won't work?

Previous Thread :: Next Thread 
Jordie6006 is not online. Jordie6006
Joined: 11 Mar 2011
Total Posts: 841
17 Dec 2013 10:15 PM
This works in Test Mode but not in Play Mode

local Model = game.Lighting.Debate
local P = game.Players.LocalPlayer

function onClicked(playerWhoClicked)
local ModelCopy = Model:Clone()
ModelCopy.Parent = P.PlayerGui
wait()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
Jordie6006 is not online. Jordie6006
Joined: 11 Mar 2011
Total Posts: 841
17 Dec 2013 10:20 PM
Bump
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
17 Dec 2013 10:22 PM
this is in a local ecript, right?
Report Abuse
Jordie6006 is not online. Jordie6006
Joined: 11 Mar 2011
Total Posts: 841
17 Dec 2013 10:26 PM
No, normal Script.
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
17 Dec 2013 10:39 PM
Theres your problem. You can access LocalPlayer without using a client sided script (localscript)
Report Abuse
Jordie6006 is not online. Jordie6006
Joined: 11 Mar 2011
Total Posts: 841
18 Dec 2013 03:06 PM
I put it as a LocalScript, and still won't work.
Report Abuse
ForeverMortal is not online. ForeverMortal
Joined: 11 Dec 2013
Total Posts: 183
18 Dec 2013 03:10 PM
What are you clicking?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
18 Dec 2013 03:12 PM
local Model = game.Lighting.Debate
local P = game.Players.LocalPlayer

function onClicked(playerWhoClicked)
print(a)
local ModelCopy = Model:Clone()
print(b)
ModelCopy.Parent = P.PlayerGui
print(c)
wait()
end

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


Did it got to a b or c?
Report Abuse
Jordie6006 is not online. Jordie6006
Joined: 11 Mar 2011
Total Posts: 841
18 Dec 2013 03:28 PM
If anyone wants to see what I am clicking follow me. I click it, and it doesn't clone to the PlayerGui. It does only in Test Mode.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
18 Dec 2013 03:31 PM
Answer my question.
Also



if Model ~= nil then



I think M might be not there
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