Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

this script that fixes the camera only works once, any way to fix this?

Asked by 6 years ago

in my game, you will deploy and it will change the camera, if you die in game, the script below would fix the camera, but it only works once.

local plr = script.Parent.Parent

plr.Character.Humanoid.Died:connect(function()
    local clone = script.CameraScript:Clone()
    clone.Parent = script.Parent
    clone.Disabled = false
end)
0
Where is the script located? Nowaha 459 — 6y
0
starter player KatsuneSniper 31 — 6y
0
If the camerascript is in the StarterPlayer, why do you need to clone it? It doesn't disappear if the player dies? Nowaha 459 — 6y
0
it gets replaced with another script when a game starts, therefore I clone it when a player dies so it can reset the camera KatsuneSniper 31 — 6y

1 answer

Log in to vote
0
Answered by
Nowaha 459 Moderation Voter
6 years ago

Try to put the "CameraScript" into the StarterCharacterScripts.

Ad

Answer this question