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

How to fire only 1 client from a player that touches a hitbox?

Asked by 4 years ago

I have this scripted so when a player touches a hitbox a client is fired from replicated storage but as the player stands on the hitbox it will keep firing the same client until I step off. Is there a way someone come help so that it only fires a single client?

In game HitBox script:

game.Workspace.HitBox.Touched:connect(function(hit)
local findhum = hit.Parent:FindFirstChild("Humanoid")
if findhum then
    print("Player has touched hitbox")
end
    game.ReplicatedStorage.Camera:FireAllClients()
    end)

Answer this question