Hello! So my system, removes the model, and places a part in the CFrame of model.HitPart, it’s just speed radars, so, basically, if you touch it at more than >= 60 speed then… you get notification, but it’s not printing ‘touched’ as it should, on .Touched function, this is how it looks when I run game on clientside
this is how it looks when i’m not running game at serverside or runing game tho, because it’s clientsided.
You might ask… uhm… why did you made this? if you can do the same, but check if .Touched was on hitpart?
Because, if other player touches it, the local player get’s bounty tho, as all in game, so if I make it clientsided, then, it’s going to work for the certain player!
function GiveFunction(v)
local yee = v
v = v.HitPart
local newpart = Instance.new("Part", workspace.SpeedRadars)
newpart.Position = v.Position
newpart.Size = v.Size
newpart.Orientation = v.Orientation
newpart.CFrame = v.CFrame
newpart.Anchored = true
newpart.Name = v.Parent.MaxSpeed.Value
newpart.CanCollide = false
newpart.Transparency = 1
yee:Destroy()
newpart.Touched:Connect(function(Hit)
print('touched')
if Character:WaitForChild("Humanoid").Sit == true and not debounce and Player.Team == game.Teams["Civilian Operations"] then
local Speed = math.ceil(Hit.Velocity.Magnitude/2)
if Speed >= tonumber(newpart.Name) then
print("Ok")
Notifications.CreateNotification("+"..tostring(math.ceil(Speed/2)).." bounty for speeding.", 6)
game.ReplicatedStorage.GiveBounty:FireServer(math.ceil(Speed/2))
debounce = true
end
wait(0.4)
debounce = false
end
end)
end
for i,v in ipairs(workspace.SpeedRadars:GetChildren()) do
if v and v:IsA("Model") then
GiveFunction(v)
end
end