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

PointsService requires LoadString to be disabled error?

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!

1 comment

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!"))".

1 answer

✓ Accepted answer

PlayerPoints Service should only be used on a Server Script.

1 comment

0

He's right.

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