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 » Scripters
Home Search
 

Re: why is this script not working? ):

Previous Thread :: Next Thread 
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:37 PM
this script is inside a gui by the way

its purpose is to take a brick inside the player and duplicate it, then put it outside the body, make it part of the workspace, and then anchor it




bin = script.Parent

b1 = game.Workspace.Player1:FindFirstChild("Brick1")
torso = game.Workspace.Player1:FindFirstChild("Torso")
local p1 = b1:clone()

function Click()

p1.CFrame = torso.CFrame * CFrame.new(Vector3.new(0.5,0,0))
p1.Parent = game.Workspace
wait(1)
p1.Anchored = true

end
bin.MouseButton1Click:connect(Click)
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:38 PM
well more specifically

what am i doing wrong here
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 08:40 PM
First going to ######## ## it an R15 or R6 rig? ATR'er since 2013.
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:40 PM
r6 rig
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:40 PM
it's a custom brick that i added to the body via another script
Report Abuse
imaginaryUberlyuber is not online. imaginaryUberlyuber
Joined: 15 Jul 2012
Total Posts: 208
02 Feb 2017 08:42 PM
Do you have FilteringEnabled ###### ###
Report Abuse
imaginaryUberlyuber is not online. imaginaryUberlyuber
Joined: 15 Jul 2012
Total Posts: 208
02 Feb 2017 08:42 PM
(oh wow roblox filters have really dirty minds)

Is Filtering Enabled on?
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:43 PM
i have no idea
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:44 PM
i'm new to scripting sorry :-0
Report Abuse
imaginaryUberlyuber is not online. imaginaryUberlyuber
Joined: 15 Jul 2012
Total Posts: 208
02 Feb 2017 08:45 PM
Click on workspace, and on the Properties menu, is the box next to FilteringEnabled checked?
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:48 PM
oh no it's not

should it be?
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 08:57 PM
well that made no change :B
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:04 PM
FilteringEnabled scripting is a whole other thing. Uncheck it, but if you do that, in the future your game will be 13+ only. This will have to be re-written using FilteringEnabled.


ATR'er since 2013.
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 09:05 PM
uh okay

well i guess i don't get what that has to do with my script
Report Abuse
imaginaryUberlyuber is not online. imaginaryUberlyuber
Joined: 15 Jul 2012
Total Posts: 208
02 Feb 2017 09:07 PM
Is the GUI a TextButton? (Just making sure)
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:07 PM
If you're planning to make this a legitimate game, you need to have FilteringEnabled. FilteringEnabled affects your scripts majorly.


ATR'er since 2013.
Report Abuse
FumeiSencho is not online. FumeiSencho
Joined: 07 Apr 2013
Total Posts: 452
02 Feb 2017 09:08 PM
uh
why are you using Player1


Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 09:09 PM
"Is the GUI a TextButton? (Just making sure)"

yes it is

unfortunately i can't figure out why it's not working ):>


"If you're planning to make this a legitimate game, you need to have FilteringEnabled. FilteringEnabled affects your scripts majorly."

how so
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:09 PM
Are you wanting this to happen with every player?


ATR'er since 2013.
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 09:09 PM
"why are you using Player1"

because i'm testing

this script is for solo purposes only at the moment
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 09:10 PM
"Are you wanting this to happen with every player?"

no but it doesn't have anything to do with Player1 i'm pretty sure

i'm just using that code for testing I know it wouldn't work in the actual game
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:10 PM
FilteringEnabled protects your games from hackers, soon Roblox is making it so games that aren't FE are 13+ only.
FilteringEnabled in order to protect you, has to do some things to the Server and Client. Therefore, you'd have to re-work your scripts.


ATR'er since 2013.
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:13 PM
Is this in a LocalScript or ServerScript (AKA a regular script)


ATR'er since 2013.
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
02 Feb 2017 09:17 PM
Try this.

local bin = script.Parent
local b1 = game.Workspace.Player1:FindFirstChild("Brick1")
local torso = game.Players.LocalPlayer.Character.Torso
local p1 = b1:clone()

script.Parent.MouseButton1Down:connect(function()
p1.CFrame = torso.CFrame * CFrame.new(Vector3.new(1,0,0))
p1.Parent = game.Workspace
wait()
p1.Anchored = true
end)


This is going to do it for every player if they click the button though.


ATR'er since 2013.
Report Abuse
DivineHate is not online. DivineHate
Joined: 29 May 2009
Total Posts: 28644
02 Feb 2017 09:40 PM
okay that works!!

the only problem is it spawns several bricks

how can i make it so it's just one?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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