I was trying to use a event called InterpolationFinished but I got a error,how do I fix it,and what does it mean?
Output:
Workspace.Player1.Right Leg.LocalScript:9: attempt to call method 'InterpolationFinished' (a userdata value)
Script that gives the LocalScript:
local Part = script.Parent.Part local Touched = false -------------------------- Part.Touched:connect(function(Player) Touched = true if not Touched then Wait(5) Touched = false else for _,Scripts in pairs (script:GetChildren()) do Cloned = Scripts:Clone() Cloned.Parent = Player Cloned.Disabled = false end end end)
LocalScript:
local Player = game.Players.LocalPlayer local Character = Player.Character local Camera = game.Workspace.CurrentCamera local Part = game.Workspace.Model.Part local Part1 = game.Workspace.Model.Part1 ------------------------------------------- Camera.CameraType = "Scriptable" Camera:Interpolate(CFrame.new(Part.CFrame.lookVector), CFrame.new(Part.CFrame.p),1) Camera.InterpolationFinished:connect(function() Camera.CameraSubject = Part Camera.CameraType = "Attach" end)
userdata
is a C object that Lua has access to.
This means it's something that the underlying engine (i.e., ROBLOX) has created.
userdata
includes Vector3, CFrame, BrickColor, and all Instances.
Because of this, errors involving userdata aren't usually very helpful.
In this case though, I don't see how this error could be triggered by this code. You aren't calling "InterpolationFinished" so I don't see the problem.