Salutations, I need help finding the error in this script.
local GUI = game.ServerScriptService.RankHandler.Rank.Frame.Points local leaderstats = "Points" local Points = leaderstats:WaitForChild("Points") Points.Value:GetPropertyChangedSignal("Value"):Connect(function() -- When the Points changes then fire the event. GUI.Text = Points.Value -- Set the Gui Text to the Value of the Points. end)
The user gets points for getting things correct during the training.
I want the BillboardGUI to change when the Leaderstat is changed.
This is how I set up mine.
ServerScript in ServerScriptService
game.Players.PlayerAdded:Connect(function(player) local ls = Instance.new("Folder",player) ls.Name = "leaderstats" local points = Instance.new("IntValue",ls) points.Name = "Points" local character = player.Character or player.CharacterAdded:Wait() local ohg = game:GetService("ReplicatedStorage"):WaitForChild("BillboardGui"):Clone() ohg.Parent = character.Head end)
ServerScript inside of Frame
wait(1) local char = script.Parent.Parent.Parent local player = game:GetService("Players"):GetPlayerFromCharacter(char) local points = player:WaitForChild("leaderstats"):FindFirstChild("Points") points:GetPropertyChangedSignal("Value"):Connect(function(value) script.Parent.TextLabel.Text = points.Value end)
Hope this helped!