Since there is no :IsA() function for a vector 3, how can I check if a Vector 3 is a vector 3?.
A vector3 in my script is sent from the client to the server in a remote event
if (plrMouse.Hit.Position + char:WaitForChild("HumanoidRootPart").Position).Magnitude < 150 then
power_Events:WaitForChild("Transmutation"):FireServer(plrMouse.Hit.Position)
clientLightingEffects(currentCamera)
end
Which sends to the server
power_Events:WaitForChild("Transmutation").OnServerEvent:Connect(function(Player, Info)
print(Info)
local Character = Player.Character or Player.CharacterAdded:Wait()
if (Info[1] + Character:WaitForChild("HumanoidRootPart").Position).Magnitude < 150 then
powersModule:InitiateTransmutation(Player.Character, Info[1])
end
end)
How do I check if the Vector3 is actually a vector 3?
“Vector3” , including the quotes, since it returns the string name of the type. typeof() is specific to Roblox. Most of the built int Roblox types are of type ‘userdata’ as far as Lua is concerned, so they give you this function to get the type more specifically.