How come my Water for my attack isn't showing up in the right place?
I was finishing up my local script, and I'd thought all of the bugs were squashed, accept that the Water - or wavelike block - wasn't showing up by my hand moving forward, rather in the workspace, in a spot right by the spawn. I've been at this for about thirty minutes, but on the last attempt, I got -
Players.fighterkirbyzx.Backpack.WaterShot.LocalScript:13: attempt to index a nil value
Here's the code-
01 | local Water = game.ReplicatedStorage.Water |
02 | local Shooter = script.Parent |
03 | local Waterclone = Water:Clone() |
05 | local person = game.Players.LocalPlayer |
06 | local mouse = person:GetMouse() |
08 | local function onclick() |
12 | Waterclone.Parent = game.Workspace |
13 | Waterclone.CFrame = CFrame.new(person:FindFirstChildWhichIsA( "RightHand" ).Position) |
14 | Waterclone.Velocity = Vector 3. new( 0 , 0 , 0 ) |
22 | mouse.Button 1 Down:Connect(onclick) |
Anyone know why?