I have this local script and when the event gets fired, it does the jumpscare after 1.2 seconds but it doesn’t visibly move the npcs position nor moves its oriantation for the lookat thing. Oh yeah and I know this is a horrible script and I’m using a local script on purpose btw.
local player = game.Players.LocalPlayer
local tweenservice = game:GetService("TweenService")
local connection
local remote = workspace.Map.Winner["Among Us vent"]:WaitForChild("Click").ProximityPrompt.Script.RemoteEvent
local potemer = workspace.Map.Winner:WaitForChild("PotemerForReal")
local function jumpscare()
player.PlayerGui.ScreenGui.jumpscare.Visible = true
task.delay(3, function()
player.PlayerGui.ScreenGui.jumpscare.Visible = false
end)
end
remote.OnClientEvent:Connect(function()
local character = player.Character
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
humanoid.WalkSpeed = 0
humanoid.JumpHeight = 0
potemer.PrimaryPart.CFrame = CFrame.lookAt(potemer.PrimaryPart.Position, character.PrimaryPart.Position)
task.wait(1)
local goal = {CFrame = character.PrimaryPart.CFrame}
local tweeninfo = TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
local tween = tweenservice:Create(potemer.PrimaryPart, tweeninfo, goal)
tween:Play()
connection = potemer.PrimaryPart.Touched:Connect(function(hit)
if hit:IsDescendantOf(character) then
jumpscare()
humanoid.Health = 0
script.Sound:Play()
end
end)
end)