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

How do I make a basketball shooting meter???

Asked by 3 years ago

So I want to make a basketball game that has like E to shoot and idk how to do that or make a shot meter so I don’t want you guys to do it for me I want you to tell me what to do and I can finish this game.

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

first add a local script in starterpack and write this

local UIS = game:GetService("UserInputService")
local Mouse = game.Players.LocalPlayer:GetMouse() 
UIS.InputBegan:Connect(function(k,p)
if p then return end
if k.KeyCode == Enum.KeyCode.E then
if game.Players.LocalPlayer.Character:FindFirstChild("Basketballnamehere")  then
game.ReplicatedStorage.RemoteEvent:FireServer(Mouse.Hit.Position)
end
end
end)

then add a remote event to replicated storage then add a script to serverscriptservice and write

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player, Mouse)
local part = Instance.new("Part")
part.Parent = workspace
part.Size = Vector3.new(3,3,3)
part.Position = Player.Character.RightHand.Position
part.Velocity = Mouse
end)

i havent tested it tho it will maybe work ill test it right after

0
press view source IEntity_303I 80 — 3y
0
Thanks! norwaynoobplayer 0 — 2y
Ad

Answer this question