I Need Help With My Job Script
Hello my name is hokyboy and i am trying to make a job script for a pizza place in my game.
I dont know what i did wrong but it doesnt work. I have tried almost everything(im a starting scripter so i dont know everything)
so first i will explain how it works so there are 4 buttons and a npc getting cloned in a loop these 4 buttons have surface guis in them.
script of the button.
local Replicated = game:GetService("ReplicatedStorage") local Event = Replicated.RemoteEvents.JobEvent script.Parent.MouseButton1Click:Connect(function() Event:FireServer() end)
here is the script that i have to give the money and despawn the buttons and npc
local Replicated = game:GetService("ReplicatedStorage")
local Event = Replicated.RemoteEvents.JobEvent
local function Job(Player)
Player.leaderstats.Money.Value
Player.leaderstats.Money.Value + 100
workspace.Good:Destroy()
workspace.Wrong1:Destroy()
workspace.Wrong2:Destroy()
workspace.Wrong3:Destroy()
if workspace:FindFirstChild("NPC") then
workspace.NPC:Destroy()
end
end
Event.OnServerEvent:Connect(Job)
