You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
The other 6 parts to appear -
What is the issue? Include screenshots / videos if possible!
6 parts do not appear.
--
local event = game:GetService("ReplicatedStorage").Events.stpatrickevent
local players = game:GetService("Players")
local localplayer = players.LocalPlayer
local folder = game.Workspace.leprachaunsspawner
local intvalue = Instance.new("NumberValue")
local id = 2142254153
intvalue.Name = "CoinValue"
intvalue.Parent = localplayer
local sound = game:GetService("SoundService").Coiny
local runservice = game:GetService("RunService")
local badgeservice = game:GetService('BadgeService')
local cantouch = true
function spinning(coin:MeshPart)
print("this ran for coin psotiion")
coin.Position = Vector3.new(coin.Position.X,1.4,coin.Position.Z)
coin.Orientation = Vector3.new(90,0,0)
runservice.Heartbeat:Connect(function()
coin.CFrame = coin.CFrame * CFrame.Angles(0,0,math.rad(.8))
task.wait(.015)
end)
end
event.OnClientEvent:Connect(function(success,result)
print(success,result)
if success then
print("it was a success")
if result == true then
print("result equalled true")
localplayer.PlayerGui.LeperCoinEvent.Frame.one.Text = "Completed!"
for i,coins in pairs(folder:GetChildren()) do
coins:Destroy()
end
elseif result == false then
print("result equals false")
localplayer.PlayerGui:WaitForChild("LeperCoinEvent").Frame.one.Text = "0/10 Coins"
for i, coin in pairs(folder:GetChildren()) do
print("for loop passed")
spinning(coin)
print("coin function fired")
coin.Touched:Connect(function(hit)
local newplayer = game.Players:GetPlayerFromCharacter(hit.Parent)
if newplayer and cantouch== true then
cantouch = false
local value = newplayer:FindFirstChild("CoinValue")
if value.Value < 9 and coin:IsA("MeshPart") then
value.Value += 1
newplayer.PlayerGui.LeperCoinEvent.Frame.one.Text = tostring(value.Value).."/10 Coins"
sound:Play()
coin:Destroy()
cantouch = true
elseif value.Value == 9 then
cantouch = false
value.Value += 1
task.wait(.5)
newplayer.PlayerGui.LeperCoinEvent.Frame.one.Text = "Completed"
local givebadge = game:GetService("ReplicatedStorage").Events.givebadge
givebadge:FireServer(newplayer)
print("awared badge to "..newplayer.Name)
cantouch = true
end
end
end)
end
end
end
end)