Answered by
8 years ago Edited 8 years ago
Alright, so you've made it clear you're not using a localscript, so here's your problem.
The term (when accessing the "Players" service) "LocalPlayer
" refers to the client's player. This can only be used when using a localscript, server scripts do not have a "LocalPlayer
". Here's how the script should go.
01 | game.Players.PlayerAdded:connect( function (Player) |
02 | local stats = Instance.new( "IntValue" ) |
04 | stats.Name = "leaderstats" |
06 | local Points = Instance.new( "IntValue" ) |
08 | Points.Name = "Pointz" |
10 | deaths = Instance.new( "IntValue" ) |
12 | deaths.Name = "Deaths" |
14 | Player.CharacterAdded:connect( function () |
15 | Player.Character.Humanoid.Died:connect( function () |
16 | deaths.Value = deaths.Value + 1 |
17 | local deathGui = Instance.new( "ScreenGui" ) |
18 | deathGui.Parent = Player.PlayerGui |
20 | local deathText = Instance.new( "TextBox" ) |
21 | deathText.Parent = deathGui |
22 | deathText.Text = "YOU SUCK, " ..Player.Name:upper() |
23 | deathText.FontSize = "Size96" |
24 | deathText.Position = UDim 2. new( 0.5 , 0 , 0.5 , 0 ) |
25 | deathText.BackgroundTransparency = 1 |
26 | deathText.TextColor 3 = Color 3. new( 255 , 255 , 255 ) |
I'm not the best at explaining, but this should fix your issue :)