Help on Plot Mechanics

I’m very new to scripting and was curious if anyone could give some input on how I might achieve the following.

  • Cash being deducted after purchasing a sign
  • Sign being destroyed upon purchase
  • Assets labelled after “spawns” to spawn

3rd image is a local script inside of the surfacegui of the sign that fires the event.



Continuando la discusión desde Help on Plot Mechanics:

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

  2. What is the issue? Include screenshots / videos if possible!

  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

No one’s gonna write code for you.

you can say a line with ` 4 times with the word lua on the end (no space).

example:

print("hello")

would be

moving on, im not the best scripter, it would be easier if you could use the ` thing to give me the code, but uh here, i noticed in the code it says

purchasesign.signs:Destroy

yes, : is the proper way to call a function on an object, such as destroy, however to call a function you need to use (). so you should replace that line with this:

purchasesign.signs:Destroy()

however rarely that could error if the sign somehow gets destroyed, you should use this final version instead:

if purchasesign and purchasesign:FindFirstChild("signs") then
	signs:Destroy()
end

a small line can really ruin a whole script…
not all heros wear a cape ahh