I'm trying to show this gui when a player finishes the obby. It's a gui that uses tween to show it everytime a players points changes.
local player = game.Players.LocalPlayer player.leaderstats.Points.Value.Changed:connect(function() script.Parent.Parent:TweenPosition(UDim2.new(0.4, 0, 0.2, 0), "Out", "In", 1.5, true) wait(5) script.Parent.Parent:TweenPosition(UDim2.new(0.4, 0, 1, 0), "Out", "Back", 1.5, true) end)
Error: Players.Player.PlayerGui.ObbyWin.Main.YouWon.Script:3: attempt to index field 'Value' (a number value)
The script is recognizing .Value as a child of Points, all you have to do is remove it and the Gui should tween.
local player = game.Players.LocalPlayer player.leaderstats.Points.Changed:connect(function() script.Parent.Parent:TweenPosition(UDim2.new(0.4, 0, 0.2, 0), "Out", "In", 1.5, true) wait(5) script.Parent.Parent:TweenPosition(UDim2.new(0.4, 0, 1, 0), "Out", "Back", 1.5, true) end)