Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this work in studio only?

Asked by 9 years ago
01    if player:IsA("Player") then
02        player.Backpack.NameChange:FireClient(player)
03            print("7")
04    end
05script.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)
19end)
01local event = script.Parent.Parent.Parent.Parent.Parent.Backpack:WaitForChild("NameChange")
02    print("10")
03event.OnClientEvent:connect(function(player)
04        print("11")
05script.Parent.MouseButton1Click:connect(function(click)
06    print("12")
07    game.Workspace.NamingCore.Changedd:FireServer()
08 
09end)
10end) --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.
0
press f9 in the game, and look through all the tabs to see what the error is, if there isn't an error, specify that there isn't. theCJarmy7 1293 — 9y
0
Okay, there isn't any errors. It just doesn't print 8 or 9 on the server. Vingam_Securis 213 — 9y

Answer this question