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: WOT IS WRONG WITH THIS

Previous Thread :: Next Thread 
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 08:58 PM
SERIOUSLY WOT IS WRONG WITH IT :(



function onClicked(playerWhoClicked)
Hair1.Transparency = 0
end

Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

if game.StarterGui.CharacterEditor.Frame.Hair1(onClicked) then
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 08:59 PM
Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

function onClicked(playerWhoClicked)
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end

game.StarterGui.CharacterEditor.Frame.Hair1.MouseButton1Click(onClicked)
Report Abuse
AxonMega is not online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
20 Jul 2016 09:00 PM
You use the Hair1 variable before you define it. Seriously, you need to read the output and script analysis.
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:03 PM
Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

function onClicked(playerWhoClicked)
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end

game.StarterGui.CharacterEditor.Frame.Hair1.MouseButton1Click(onClicked)

one thing i forgot to mention, you are trying to click it from startergui...?

this should be a local script within the gui its self or some other way.

Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

function onClicked()
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end

script.Parent.Frame.Hair1.MouseButton1Click(onClicked)


so for example, you would put the above as a localscript located in the gui "CharacterEditor"
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:03 PM
Doesnt work this is what it says is wrong now

Players.Player1.PlayerGui.CharacterEditor.Frame.Hair1.Script:28: attempt to call field 'MouseButton1Click' (a userdata value)

:( Plz help
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:04 PM
Hair1 should be a TextButton otherwise you won't be able to click it and cause a function
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:05 PM
@AxonMega I tried that but then it says

Players.Player1.PlayerGui.CharacterEditor.Frame.Hair1.Script:12: attempt to call field 'Hair1' (a userdata value)
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:07 PM
It is a Text Button
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:09 PM
make a LocalScript and place it under "CharacterEditor" then this should work

Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

function onClicked()
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end

script.Parent.Frame.Hair1.MouseButton1Click:connect(onClicked)
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:10 PM
So I put what u just made for me into a local script? Is that correct? sorry Im new to scripting, I usually build
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:12 PM
yup into a localscript, its fine dont worry lol

but make sure its in "CharacterEditor"
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:14 PM
Still doesnt work, says in the output:

Players.Player1.PlayerGui.CharacterEditor.LocalScript:12: attempt to call field 'MouseButton1Click' (a userdata value)
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:16 PM
Hair1 must not be a TextButton then otherwise im not too sure whats causing the error lol
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:17 PM
K um CharacterEditor.Frame.Hair1 is a text button, but Hair1 = game.Workspace.Hair1 isnt
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:18 PM
if possible, could i have a model of the screengui to figure out the problem?
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:18 PM
Sure, I guess u could take it off my profile Ill upload it
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:21 PM
I did it I uploaded it to my profile/roblox
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:25 PM
Hair1 = game.Workspace.Hair1
Hair2 = game.Workspace.Hair2
Hair3 = game.Workspace.Hair3
Hair4 = game.Workspace.Hair4

function onClicked()
if Hair1.Transparency == 1 then
Hair1.Transparency = 0
end
end

script.Parent.Frame.Hair1.MouseButton1Click:connect(onClicked)


put this in the localscript (rmeove everything else in the localscript lol) and it should work fine
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:26 PM
YES THANK U I HAVE BEEN WORKING ON THIS FOR 3 DAYS YUSSSSSSS


But 1 question...

How do I make the hair go onto the player :3
Report Abuse
SkyDoesMinecraft is online. SkyDoesMinecraft
Joined: 15 Jul 2012
Total Posts: 656
20 Jul 2016 09:31 PM
thats a bit more complicated and would require hats with handles and not just the part lol
Report Abuse
Alend43 is not online. Alend43
Joined: 13 Nov 2013
Total Posts: 451
20 Jul 2016 09:33 PM
Lol
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