Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Anyone help me, my script isnt working. its to change a Cframe value?

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

1 comment

0

dude us code block and put your script in between

2 answers

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.

2 comments

0

ok

0

It Didnt Work it said expected value not number

This discussion is preserved as it was. New answers, comments, and votes are closed.