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

PointsService requires LoadString to be disabled error?

Asked by 7 years ago

I have no idea what LoadString is and this is my first time working with points.

This is my script;

local button = script.Parent
local AdPlaying = button.Parent:WaitForChild("AdPlaying")
local AdFrame = button.Parent.Parent:WaitForChild("AdFrame")
local PlayerPoint = game:GetService("PointsService")
local Amount = button.Parent:WaitForChild("AdValue").Value
local player = game.Players.LocalPlayer

button.MouseButton1Down:connect(function()
    if AdPlaying.Value == true then
        AdPlaying.Value = false
        AdFrame:TweenPosition(UDim2.new(0, -500,0, 100),'In','Sine',0.5)
        PlayerPoint:AwardPoints(player.UserId,Amount)
    end
end)

The error is on line 12. Please help!

0
What it means, if Loadstring is enabled, the game CANNOT award points, period. Loadstring is a function you can enable via ServerScriptService and you can run strings in lua like "loadstring('print("Hello world!"))". hiimgoodpack 2009 — 6y

1 answer

Log in to vote
0
Answered by
Mayk728 855 Moderation Voter
7 years ago

PlayerPoints Service should only be used on a Server Script.

0
He's right. Adrian12094 12 — 7y
Ad

Answer this question