So I am very new to scripting and I'm trying to make a tool move into a players starterpack when they press a button.
local button = script.Parent
local player = game.Players.LocalPlayer
button.MouseButton1Click:connect(function()
button.Parent.TextLabel.Visible = false
button.Visible = false
local fireball = game:GetService("ReplicatedStorage"):FindFirstChild("Fireball"):Clone()
fireball.Parent = player:FindFirstChild("StarterGear")
wait(0.5)
player.Character.Humanoid.Health = nil
end)
It works completely fine in studio test mode, however in play mode the player is reset, the gui on their screen disappears, but they don't get the tool?
The LocalScript is inside a button in StarterGui.
In play mode there is no error output in Client Log.
Edit - I want to keep the game with FE on, is there any fix?

1 comment
make sure FE is off