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

How do I make this script activate only when I join but not when I die?

Asked by 5 years ago
local player = game.Players.LocalPlayer
local character = player.Character
local camera = workspace.CurrentCamera

repeat wait()
    camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable

camera.CFrame = workspace.CameraPos.CFrame
local blur = Instance.new("BlurEffect",camera)
blur.Size = 15

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

This should work if you place this in game.StarterPlayer.StarterPlayerScripts

local player = game.Players.LocalPlayer
local character = nil
repeat wait() until player.Character
character=player.Character
local camera = workspace.CurrentCamera

repeat wait()
    camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable

camera.CFrame = workspace.CameraPos.CFrame
local blur = Instance.new("BlurEffect",camera)
blur.Size = 15

If this helped, please accept my answer!

0
Thanks EhEhEhEhLPKJ 9 — 5y
Ad

Answer this question