Hello! I’m making a game where when the player touches the object, the object disappears and sends a point to your points. How do I do that?
Assuming the object is a part and you added a click detector do the following Also assuming theres a numbervalue that you have made in a local script named “Points”. If there isn’t you will need to use
Instance.new(“NumberValue”)
Workspace.The part.Clickdetector.MouseClick:Connect(Function(player)
workspace.The part:Destroy() -- destroys it
-- or The part.Transparency = 1
player.Points.Value = player.Points.Value + 200 -- adds 200 points.
end)
1 Like
Thanks, man. That really helped.
You could also do an IntValue I believe, unless I read the post incorrectly.
You could use Int value but number value allows decimals if you want.