My problem: Code isn’t giving any errors and is not undisabling.
My code:
CAMERA CODE
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local target = workspace.ClerkPart -- The object to rotate around
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local rotationAngle = Instance.new("NumberValue")
local tweenComplete = false
local cameraOffset = Vector3.new(0, 10, 12)
local rotationTime = 15 -- Time in seconds
local rotationDegrees = 360
local rotationRepeatCount = -1 -- Use -1 for infinite repeats
local lookAtTarget = true -- Whether the camera tilts to point directly at the target
local function updateCamera()
if not target then return end
camera.Focus = target.CFrame
local rotatedCFrame = CFrame.Angles(0, math.rad(rotationAngle.Value), 0)
rotatedCFrame = CFrame.new(target.Position) * rotatedCFrame
camera.CFrame = rotatedCFrame:ToWorldSpace(CFrame.new(cameraOffset))
if lookAtTarget == true then
camera.CFrame = CFrame.new(camera.CFrame.Position, target.Position)
end
end
-- Set up and start rotation tween
local tweenInfo = TweenInfo.new(rotationTime, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, rotationRepeatCount)
local tween = TweenService:Create(rotationAngle, tweenInfo, {Value=rotationDegrees})
tween.Completed:Connect(function()
tweenComplete = true
end)
tween:Play()
-- Update camera position while tween runs
RunService.RenderStepped:Connect(function()
if tweenComplete == false then
updateCamera()
end
end)
My 2nd code:
CAMERA UNDISABLER
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Players = game:GetService("Players")
local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()
local Badge_Service = game:GetService("BadgeService")
local Players = game:GetService("Players")
local BadgeID = 2125784344
local BadgeID1 = 2125784379
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TypeWriter = require(ReplicatedStorage:WaitForChild('TypeWriter'))
local Prompt = game.Workspace.signupredirectlol.ProximityPrompt
local screengui = game.Players.LocalPlayer.PlayerGui.ScreenGui
local CGUI = game.Players.LocalPlayer.PlayerGui.CGUI
local greeting = game.Players.LocalPlayer.PlayerGui.CGUI.greeting
local No = game.Players.LocalPlayer.PlayerGui.CGUI.No
local Yes = game.Players.LocalPlayer.PlayerGui.CGUI.Yes
local NResponse = game.Players.LocalPlayer.PlayerGui.CGUI.NResponse
local YResponse = game.Players.LocalPlayer.PlayerGui.CGUI.YResponse
local Frame = game.Players.LocalPlayer.PlayerGui.CGUI.Frame
local money = game.Players.LocalPlayer.PlayerGui.CGUI.Frame.money
local noc = game.Players.LocalPlayer.PlayerGui.CGUI.Frame.noc
local CAMCODE = game.StarterPlayer.StarterCharacterScripts.ClerkHandler
Prompt.Triggered:Connect(function()
Prompt.Enabled = false
Controls:Enable(false)
No.Visible = true
Yes.Visible = true
greeting.Visible = true
CAMCODE.Disabled = false
TypeWriter.typeWrite(script.Parent, "hey, you here to buy cheese? we only have one left")
wait(2)
end)
It isn’t the full code for the undisabler, that is just to show where it is.
What is should do when it is undisabled and when the promt is triggered: