Hello DevForumers, I’m at a roadblock here, I’m trying to make a system so when your on a certain team and you got into first-person, a GUI appears. I’ve gotten the first person section working, I’m just struggling with the team section.
local function isFirstPerson()
local camera = workspace.CurrentCamera
local character = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded
if (character.Head.CFrame.p - camera.CFrame.p).magnitude < 1 then
return true
else
return false
end
end
while wait() do
local isFirstPerson = isFirstPerson()
if isFirstPerson == true then
script.Parent.Visible = true
else
script.Parent.Visible = false
script.Parent.Start:Play()
end
end
Thank you - Secretajnz