I’m trying to create a script where when you die it respawns the box. I’ve tried to make it through a normal local script, but it only works globally so now I’m trying to create it through a remote event but I’m not quite understanding it.
Here are my scripts to show you what’s going on. I’m not sure what I’ve done wrong so if you have any feedback or examples that would be great. Thanks.
Instead of firing through remote events. Just use a local script and try:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.Character:Wait()
char:WaitForChild("Humanoid").Died:Connect(function()
if workspace:FindFirstChild("box") then
workspace.box:Destroy()
local copy = game:GetService("ReplicatedStorage").box:Clone()
copy.Parent = workspace
end
end)
yeah, I finally figured it out. it wasn’t and also, I had to tweak one thing. Which makes me very happy because I gave up on it like a month and a half ago but then I was like, I really want to finish this and now I have.
here I’ll mark yours as solution because it pretty much was.