Why is this script not working, are the 2 if's correct? (The Ready.Value works, the rest doesn't most probably because of the conditions)
function onTouch(hit) local Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then local Player = game.Players:FindFirstChild(Humanoid.Parent.Name) if Player.PlayerGui.Ready.Value == true then Player.PlayerGui.Ready.Value = false end if Player.ds.Worn1 == 1 then local Clone = game.ReplicatedStorage.Animals.BigHead:Clone() Clone.Parent = Player.Character local Clone1 = game.ReplicatedStorage.Weapons.Katana:Clone() Clone1.Parent = Player.Backpack wait(1) Player.PlayerGui.Ready.Value = false end else end end script.Parent.Touched:connect(onTouch)
I think it is the second if
My version:
if Player.ds.Worn1.Value == 1 then local Clone = game.ReplicatedStorage.Animals.BigHead:Clone() Clone.Parent = Player.Character local Clone1 = game.ReplicatedStorage.Weapons.Katana:Clone() Clone.Parent = Player.Backpack wait(1) Player.PlayerGui.Ready.Value = false end
Edit: Missed out the end