So whenever the player joins it checks to see if a value = true, if it is true it will send a remote event.
For some reason everything else works exept for the executioneraxe… If I remove line 18 it works nothing else, any ideas?
local rp = game:GetService("ReplicatedStorage")
local plr = game:GetService("Players")
local re = game.ReplicatedStorage.OnJoin.Normalaxe
local rr = game.ReplicatedStorage.OnJoin.Diamondaxe
local rt = game.ReplicatedStorage.OnJoin.Lumberjackaxe
local ry = game.ReplicatedStorage.OnJoin.Executioneraxe
local ru = game.ReplicatedStorage.OnJoin.Doubleaxe
local ri = game.ReplicatedStorage.OnJoin.Steampunkaxe
local ro = game.ReplicatedStorage.OnJoin.Voidaxe
plr.PlayerAdded:Connect(function(player: Player)
local axes = player:WaitForChild("axes") -- I'm assuming this is some folder in player
if not axes then player:Kick("Data could not load, please rejoin.") end
local normalAxe = axes:WaitForChild("Normalaxe")
local diamondAxe = axes:WaitForChild("Diamondaxe")
local lumberjackAxe = axes:WaitForChild("Lumerjackaxe")
local ExecutionerAxe = axes:WaitForChild("Executioneraxe")
local DoubleAxe = axes:FindFirstChild("Doubleaxe")
local SteampunkAxe = axes:FindFirstChild("Steampunkaxe")
local VoidAxe = axes:FindFirstChild("Voidaxe")
print("a")
if not normalAxe then return end
if not diamondAxe then return end
if not lumberjackAxe then return end
if not ExecutionerAxe then return end
if not DoubleAxe then return end
if not SteampunkAxe then return end
if not VoidAxe then return end
wait(0.01)
if normalAxe.Value == true then
re:FireClient(player)
print("aa")
end
if diamondAxe.Value == true then
rr:FireClient(player)
print("100")
end
if lumberjackAxe.Value == true then
rt:FireClient(player)
end
if ExecutionerAxe.Value == true then
ry:FireClient(player)
end
if DoubleAxe.Value == true then
ru:FireClient(player)
end
if SteampunkAxe.Value == true then
ri:FireClient(player)
end
if VoidAxe.Value == true then
ro:FireClient(player)
end
end)
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.