local event = script.Parent.Parent:WaitForChild("RemoteEvent") local GrabPart = script.Parent.Parent local player = game.Players.LocalPlayer event.OnServerEvent:connect(function() local dad = Instance.new("Attachment",GrabPart) dad.Position = Vector3.new(0,1.201,0)
local hand = game.Players.LocalPlayer.Character.LeftHand local dadd = Instance.new("Attachment",hand) dad.Position = Vector3.new(0,-0.1,0) local rod = Instance.new("RodConstraint",GrabPart) rod.Attachment0 = dad rod.Attachment1 = dadd rod.Length = 1 GrabPart.CanCollide = false local holding = Instance.new("IntValue",GrabPart) holding.Name = "holding" holding.Value = 1
end)
Workspace.GrabPart.RemoteEvent.Grab:6: attempt to intex upvalue 'player' (a nil value) Stack Begin Script (Workspace.GrabPart.RemoteEvent.Grab', Line 6 Stack End
Plz help me fix the script.
I saw you on the chat, You said you wern't using a local script. LocalPlayer Is only available in local scripts.