Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Getting "attempt to index nil with 'FireServer'?

Im working on my game and im attempting to fire a server script from a local script in StarterCharacterScripts using a RemoteEvent but im getting this error "attempt to index nil with 'FireServer'

local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Test ReplicatedStorage:WaitForChild('Test')

game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.V then
		Test:FireServer()
		script.Disabled = true
    end 
end)

can i get help with whats wrong with this?

1 comment

0

-coughs-

1 answer

✓ Accepted answer

You forgot the "=" on line 2.

1 comment

0

ohhh im dumb thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.