Im a new scripter and i wanted to make a game, where you have to collect different types of items, each worth a different amount of money, i just want to ask how do you make the stuff collectable? For example when you click and hold in a certan distance it collect, kinda like most mining games. And also, if you know, please also tell me how to spread the items around the map and have more or less of an item in different areas. Ill be asking a few more questions but thats all for now.
COMMUNITY QUESTION
How do you make collectable items?
1 answer
Actually this is quite not hard. Follow these steps
1 - Make a localscript in StarterPack. Insert the following code:
plr = game.Players.LocalPlayer mouse = plr:GetMouse() char = plr.Character
mouse.Button1Down:connect(function() if mouse.Target ~= nil then tar = mouse.Target end
if tar.Name == "BlockName" then tar:Destroy() -- Add more here end
end)
That's the basics. It destroys your block. If u need more then check the Wiki. If you're a beginner then seriously don't make a complicated game. This script is for Intermediate level scripters.
This discussion is preserved as it was. New answers, comments, and votes are closed.
