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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 13 Nov 2013 |
| Total Posts: 451 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 20 Jul 2016 09:12 PM |
yup into a localscript, its fine dont worry lol
but make sure its in "CharacterEditor" |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 20 Jul 2016 09:18 PM |
| if possible, could i have a model of the screengui to figure out the problem? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 13 Nov 2013 |
| Total Posts: 451 |
|
| |
|