Right now, I've made it so it shows a button to get the sword. What could I do to make it GIVE them the sword instead of them clicking a button?
Here is the script:
wait(0.5) game.Workspace.Cave:Stop() wait(1) for _,player in pairs(game.Players:GetPlayers()) do player.PlayerGui.ScreenGui.TextButton.Visible = true end wait(2) game.ServerScriptService.bossfightScript.Disabled = false
Something you can do is get yourself a clone of the sword:
local SwordClone = game.ReplicatedStorage.Sword:Clone()
and do something like
local SwordClone = game.ReplicatedStorage.Sword:Clone() for _,player in pairs(game.Players:GetPlayers()) do SwordClone.Parent = player.Backpack end
But somethings wrong.. it will only give it to one player, thats cause we only have one copy of the sword, an easy solution around this is:
for _,player in pairs(game.Players:GetPlayers()) do local SwordClone = game.ReplicatedStorage.Sword:Clone() SwordClone.Parent = player.Backpack end
this way we get one copy of the sword for every player we find and put it in their backpack.
I hope this helps!