I have this script that gives you a belt if you have a value, and it does not work, and theres also no output error, any help?
wait(0)
local player = game.Players.Pooglies
local character = player.Character
local Fendi = script.Fendi
local LouisVuitton = script.LouisVuitton
local Versace = script.Versace
local Gucci = script.Gucci
local open = false
function PlayerAdded(p)
print(p.Name)
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if open == false and player:WaitForChild("leaderstats").Belts.Value == 1 then
open = false
local newRadio = Fendi:Clone()
newRadio.Parent = character
newRadio.CFrame = character.LowerTorso.CFrame * CFrame.Angles(0,3.14,6) -- or Torso if you use R6
local weld = Instance.new("Weld")
weld.Part0 = newRadio
weld.Part1 = character.LowerTorso
weld.C0 =newRadio.CFrame:inverse()
weld.C1 = character.LowerTorso.CFrame:inverse()
weld.Parent = newRadio
end
end)
end)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if open == false and player:WaitForChild("leaderstats").Belts.Value == 2 then
open = false
local newRadio = Gucci:Clone()
newRadio.Parent = character
newRadio.CFrame = character.LowerTorso.CFrame * CFrame.Angles(0,3.14,6) -- or Torso if you use R6
local weld = Instance.new("Weld")
weld.Part0 = newRadio
weld.Part1 = character.LowerTorso
weld.C0 =newRadio.CFrame:inverse()
weld.C1 = character.LowerTorso.CFrame:inverse()
weld.Parent = newRadio
end
end)
end)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if open == false and player:WaitForChild("leaderstats").Belts.Value == 3 then
open = false
local newRadio = LouisVuitton:Clone()
newRadio.Parent = character
newRadio.CFrame = character.LowerTorso.CFrame * CFrame.Angles(0,3.14,6) -- or Torso if you use R6
local weld = Instance.new("Weld")
weld.Part0 = newRadio
weld.Part1 = character.LowerTorso
weld.C0 =newRadio.CFrame:inverse()
weld.C1 = character.LowerTorso.CFrame:inverse()
weld.Parent = newRadio
end
end)
end)
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if open == false and player:WaitForChild("leaderstats").Belts.Value == 4 then
open = false
local newRadio = Versace:Clone()
newRadio.Parent = character
newRadio.CFrame = character.LowerTorso.CFrame * CFrame.Angles(0,3.14,6) -- or Torso if you use R6
local weld = Instance.new("Weld")
weld.Part0 = newRadio
weld.Part1 = character.LowerTorso
weld.C0 =newRadio.CFrame:inverse()
weld.C1 = character.LowerTorso.CFrame:inverse()
weld.Parent = newRadio
end
end)
end)

3 comments
I'm not sure, but the variable "player" MAY be colliding with "player" inside the function. No point on making a variable that you'll not use. Simply change or delete it if you're not using.
Ohhh, you may be right, let me test this out.
It may have been PART of the issue, but it still doesn't work :?