local block = game.Workspace.JoiningReward.JoiningRewardBlock
local player = game.Players.LocalPlayer
block.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if player.CodesUsed.Codes.Value == 0 then
player.CodesUsed.Codes.Value = player.CodesUsed.Codes.Value +1
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value +250
print("Player Recieved Price!")
block.JoiningRewardGui.BillboardGui.Text.Text = " "
else
if player.CodesUsed.Codes.Value >= 1 then
print("Player Already Recieved Price!")
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value +250
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value -250
end
end
end
end)
end)
COMMUNITY QUESTION
[SOLVED]why do i have a error at the end i am getting a headache because i cant figure it out?
1 answer
NVM!! GOT IT!!
local block = game.Workspace.JoiningReward.JoiningRewardBlock
local player = game.Players.LocalPlayer
block.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if player.CodesUsed.Codes.Value == 0 then
player.CodesUsed.Codes.Value = player.CodesUsed.Codes.Value +1
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value +250
print("Player Recieved Price!")
block.JoiningRewardGui.BillboardGui.Text.Text = " "
else
if player.CodesUsed.Codes.Value >= 1 then
print("Player Already Recieved Price!")
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value +250
player.leaderstats.Swings.Value = player.leaderstats.Swings.Value -250
end
end
end
end)
1 comment
0
LOL da da da
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
why do you got 2 end)'s LIKE BRO
If you properly indented your code this woulnt be such a problem