Edit By RubenKan: Placed code in the correct codeblock.
script.Parent.MouseButton1Click:connect(function(plr) script.Parent.resetdone.Enabled = true script.Parent.Parent:TweenPosition(UDim2.new(0, 400,0, 1074), "Out", "Bounce", 1, true) wait(1) game.Players.LocalPlayer.leaderstats.Cash.Value = 0 print("Cash Reset") game.Players.LocalPlayer.leaderstats.Level.Value = CFrame.new(-7196, 1.5, 131) print("level reset") wait(4) script.Parent.resetdone:Destroy() script.Parent.Parent.Parent:Destroy() end)
its ment to reset players data but the CFrame doesnt work.
If Anyone Could help
its in a normal script if tried a local
This should be in a local script as a server script cannot reference LocalPlayer. Also, I believe line 7 should be
game.Players.LocalPlayer.leaderstats.Level.Value = -7196, 1.5, 131
As it is not creating a new 'Instance' of CFrame, simply just passing a CFrame Value.