Ad
Log in to vote
0

The developer Console says "index nil" for my script. How do I fix this?

Asked by 16 days ago

Script:


function make(pos) local g = Instance.new("Part") g.Parent = workspace g.BrickColor = BrickColor.new("Cork") g.Size = Vector3.new(4,4,4) g.CFrame = pos end script.Parent.Parent.Activated:Connect(function() local mouse = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent):GetMouse() make(mouse.Hit) end)

The problem is that every time this script runs on line 11 it causes an index nil for some reason. How do I fix this?

0
this is a normal script not local btw snowpototoy 37 — 16d
0
Where is this script placed BeautifulAuraLover 371 — 15d
0
startergui snowpototoy 37 — 14d
0
I'd recommend using remote events for this. echobloxia 21 — 14d

Answer this question