hello i need help! i want to make breakable level crossing barrier. but i dont want to it break on litte touch! So is there any way to make barrier break on high speed? i mean idk break weld? (i know how to do that) but i dont know how to make script activate when Parent is hit wilt speed for example 50 sps if you have answer to this q then thanks!
i found a post in roblox dev forum and it looks like this ( a speed camera script)
Polyheximal Programmer Mar '20
Theoretically, you could use raycasts from a speed camera to see if there are any players nearby. If there are, then check the speed of that player.
Pseudo-ish:
ray.New() if rayCanSeeAnyPlayers then if playerSpeed > speedLimit then print("is speeding") end end
can anyone say what "ray" is?
Maybe something like this will work:
local barrier = game.Workspace.Barrier --Just reference the barrier here barrier.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if hit.Parent.Humanoid.Speed >= [insert minimum speed here] then barrier:Destroy() end end end)