Erroring at line 68:
local Core = { ... }
local Server, Self = game, script
local UserInputService = Server:GetService('UserInputService')
local ProximityPromptService = Server:GetService('ProximityPromptService')
local Player = Server:GetService('Players').LocalPlayer
local Character, Humanoid
local CF
--||--||--||
function Core:ScreenGui(...)
local ScreenGui = Player:WaitForChild('PlayerGui', 1):FindFirstChild('ProximityPrompt')
if not ScreenGui then
ScreenGui = Instance.new('ScreenGui')
ScreenGui.Name = 'ProximityPrompt'
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = Player:WaitForChild('PlayerGui', 1)
end
return ScreenGui
end
function Core:Tween(Obj, Info, Properties, ...)
local TweenService = Server:GetService('TweenService')
TweenService:Create(Obj, Info, Properties ):Play(...)
end
function Core:Disconnect(table, ...)
for a, b in pairs (table) do
if b ~= nil then
b:Disconnect(...)
b = nil
end
end
end
--||--||--||
function Core:CreatePrompt(ProximityPrompt, InputType, ScreenGui, ...)
local H, S, V
local Mouse1Down, Mouse1Up
local HoldBegan, HoldEnded
local Triggered, TriggerEnded
local PromptUI = Self:WaitForChild('PromptUI', 1):Clone(...)
PromptUI.Adornee = ProximityPrompt.Parent
if ProximityPrompt:GetAttribute('Color3') then
PromptUI.Frame.BackgroundColor3 = ProximityPrompt:GetAttribute('Color3')
end
if ProximityPrompt:GetAttribute('CornerRadius') then
PromptUI.Frame.UICorner.CornerRadius = ProximityPrompt:GetAttribute('CornerRadius')
PromptUI.Frame.Progress.UICorner.CornerRadius = ProximityPrompt:GetAttribute('CornerRadius')
end
H, S, V = PromptUI.Frame.BackgroundColor3:ToHSV()
PromptUI.Frame.Progress.BackgroundColor3 = Color3.fromHSV(H, S, V + (255/255))
PromptUI.Parent = ScreenGui
PromptUI.Frame.ButtonText.Text = UserInputService:GetStringForKeyCode(ProximityPrompt.KeyboardKeyCode)
PromptUI.Frame.ObjectText.Text = ProximityPrompt.ObjectText
PromptUI.Frame.ActionText.Text = ProximityPrompt.ActionText
Triggered = ProximityPrompt.Triggered:Connect(function(...)
PromptUI.Enabled = false
CF = Character:GetPivot(...) -- here
TriggerEnded = ProximityPrompt.TriggerEnded:Connect(function(...)
TriggerEnded:Disconnect(...)
PromptUI.Enabled = true
end)
end)
HoldBegan = ProximityPrompt.PromptButtonHoldBegan:Connect(function(a, b, c)
local Progress = PromptUI.Frame.Progress
Progress.Visible = true
Progress.UIScale.Scale = 0
Core:Tween(Progress.UIScale, TweenInfo.new(ProximityPrompt.HoldDuration), {Scale = 1})
HoldEnded = ProximityPrompt.PromptButtonHoldEnded:Connect(function(...)
Core:Disconnect({HoldEnded})
Progress.Visible = false
Progress.UIScale.Scale = 0
end)
end)
Mouse1Down = PromptUI.TextButton.MouseButton1Down:Connect(function(...)
ProximityPrompt:InputHoldBegin()
Mouse1Up = PromptUI.TextButton.MouseButton1Up:Connect(function(...)
Mouse1Up:Disconnect(...)
ProximityPrompt:InputHoldEnd()
end)
end)
ProximityPrompt.PromptHidden:Wait(...)
PromptUI:Destroy(...)
Core:Disconnect({Mouse1Down, Mouse1Up, HoldBegan, HoldEnded, Triggered, TriggerEnded})
end
--||--||--||
Player.CharacterAdded:Connect(function(CharacterAdded, ...)
Character = CharacterAdded
Humanoid = Character:WaitForChild('Humanoid', 1)
end)
ProximityPromptService.PromptShown:Connect(function(ProximityPrompt, InputType, ...)
if ProximityPrompt.Style == Enum.ProximityPromptStyle.Custom then
local ScreenGui = Core:ScreenGui(...)
Core:CreatePrompt(ProximityPrompt, InputType, ScreenGui, ...)
end
end)
--||--||--||
return Core
CF = Character:GetPivot(...) -- here
The error is: ProximityPrompt:68: attempt to index nil with 'GetPivot'
EDIT: I ended up deleting it and it did nothing. If it does anything I’ll let you know. Also not expecting any replies any time soon.