Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is the ToP function deprecated?

Asked by 4 years ago

So I was busy making a Raycast weapon, when I found that it was saying that ToP was a nil value. Has ToP been deprecated? I looked back at some RayCast videos from Feb 2019 and ToP was an official function. Here's the code:

local FireEvent = script.Parent.FireEvent
local Dmg = math.random(15, 20)
FireEvent.OnServerEvent:Connect(function(Player, FromP, ToP)
    local RayCast = Ray.new(FromP, (ToP-FromP).unit*100)
    local Part = game.Workspace:FindPartOnRay(RayCast, Player.Character, false, true)
    if Part then
        local Hum = Part.Parent:FindFirstChild("Humanoid")
        if Hum then
            Hum:TakeDamage(Dmg)
        end
    end
end)

Any ideas? (I did look in object browser and found no results )

0
Deprecated != Doesn't work DeceptiveCaster 3761 — 4y
0
Well I know that. I'm asking if ToP is deprecated? Cynical_Innovation 595 — 4y
0
What is top royaltoe 5144 — 4y
0
I can't find any history on ToP. Not even on the wiki. When I look up all the deprecated functions, the only thing i see is LoadLibrary. No history on ToP whatsoever Cynical_Innovation 595 — 4y

1 answer

Log in to vote
0
Answered by
ScuffedAI 435 Moderation Voter
4 years ago
Edited 4 years ago

Judging from your code, "ToP" is not something made by roblox but a variable created by yourself in line 3. The issue seems to be that the client did not provide the third argument to the remote event, which is why "ToP" became nil. I would advice you to start looking into your localscript to find out why the client doesn't provide the last argument.

0
Ah, thanks. Lemme try it Cynical_Innovation 595 — 4y
0
I still don't know what top is???? royaltoe 5144 — 4y
Ad

Answer this question