local p = game.Players.LocalPlayer
local par = script.Parent
local rs = game:GetService("ReplicatedStorage")
if p.Backpack.Vessels.HasFrisk.Value == false then
script.Parent.ImageColor3 = Color3.fromRGB(50,50,50)
end
par.MouseButton1Click:Connect(function()
if p.Backpack.Vessels.HasFrisk.Value == true then
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
rs.Remotes.Selected:FireServer("Frisk")
print("worked")
end
end)
additional info:
CharacterAutoLoads = false
This is a local script
happens as soon as I start the game
Just for your info, if you get this kind of error for anything else, although the instance does exist, it’s best to use WaitForChild, as the script may have run before the instance has loaded. So next time, use WaitForChild if you get this kind of error again.
Example:
Instead of
local backpack = game.Players.LocalPlayer.Backpack
Do
local backpack = game.Players.LocalPlayer:WaitForChild("Backpack")