So after i converted my local script and moved it to a normal script witch acts as a remote event for it(swiching game from non-fe to fe) I started getting this message:attempt to index local 'mouse' (a nil value) I don't know what is wrong. I whould apreciate if someone could look at the code and figure it out. Thanks in advance
script.Fire.OnServerEvent:Connect(function(Player)
local mouse = Player:GetMouse() local flame = game.Workspace.Amaterasu local db = false
local timeout = 20
db = true
while timeout > 0 do
local flameCOPY = flame:Clone()
flameCOPY.Parent = game.Workspace
flameCOPY.CFrame = mouse.Hit
flameCOPY.Name = "Amaterasu2"
timeout = timeout - 1
wait(0.1)
end
timeout = 20
end)

1 comment
You can't get the mouse from a server-sided script