01 | if player:IsA( "Player" ) then |
02 | player.Backpack.NameChange:FireClient(player) |
03 | print ( "7" ) |
04 | end |
05 | script.Changedd.OnServerEvent:connect( function () --This is a script in Workspace. The part not working. (FE enabled.) |
06 | if player.PlayerGui.ScreenGui.MainFrame.PlayerName.Text ~ = "" then |
07 | player.leaderstats.Character.Value = player.PlayerGui.ScreenGui.MainFrame.PlayerName.Text |
08 | player.Character.Head.BillboardGui.MainFrame.PlayerLabel.Text = (player.PlayerGui.ScreenGui.MainFrame.PlayerName.Text) |
09 | print ( "8" ) |
10 | end |
11 |
12 | if player.PlayerGui.ScreenGui.MainFrame.Occupation.Text ~ = "" then |
13 | player.leaderstats.Occupation.Value = player.PlayerGui.ScreenGui.MainFrame.Occupation.Text |
14 | player.Character.Head.BillboardGui.MainFrame.OccupationLabel.Text = (player.PlayerGui.ScreenGui.MainFrame.Occupation.Text) |
15 | print ( "9" ) |
16 | end |
17 | end ) |
18 | end ) |
19 | end ) |
01 | local event = script.Parent.Parent.Parent.Parent.Parent.Backpack:WaitForChild( "NameChange" ) |
02 | print ( "10" ) |
03 | event.OnClientEvent:connect( function (player) |
04 | print ( "11" ) |
05 | script.Parent.MouseButton 1 Click:connect( function (click) |
06 | print ( "12" ) |
07 | game.Workspace.NamingCore.Changedd:FireServer() |
08 |
09 | end ) |
10 | end ) --This is what triggers the event or should at least in the script above this one. |
11 | --What could of I possibly done wrong, and if so. Please explain what I did wrong ^^; |
12 | --This is a local script inside of a TextButton, inside of a frame, inside of a screenGui. |
13 | --The event NameChange is in StarterPack and Changedd is created by NamingCore once the server starts up. Putting the event inside itself. |