Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
Edited by RubenKan 6 years ago

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

0
dude us code block and put your script in between FlippinAwesomeCrew 62 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

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.

0
ok BlackScorpyon04 0 — 6y
0
It Didnt Work it said expected value not number BlackScorpyon04 0 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

I worked it out thanks for the help anyway

Answer this question