mouse.KeyDown:connect(function (key)
local key = string.lower(key)
if string.byte(key) == 48 then
local keyConnection = mouse.KeyUp:connect(function (key)
if string.byte(key) == 48 then
if used == false then
used = true -- Run function
Remote.RemoteEvent:FireServer()
used = true
for i = 1,5 do
game.Workspace.CurrentCamera.FieldOfView = (70+(i*2))
wait()
end
script.Parent.Boost.Whole.Fill:TweenSize(UDim2.new(0, 0,1, 0),"Out","Quad",5)
script.Parent.Boost.Whole.Fill.Text = " "
wait(5)
for i = 1,5 do
game.Workspace.CurrentCamera.FieldOfView = (80-(i*2))
wait()
end
wait(3)
script.Parent.Boost.Whole:TweenPosition(UDim2.new(.25,0,3,0),"Out","Quad",3.5)
wait(3)
script:Destroy()
end
end
end)
end
end)
Its not working! it works fine in studio but when I play in game nothing happens at all!

11 comments
nothing in console.
May I ask what you are trying to do? And if you could give reference as to where your remote event is and what function is being triggered by that.
I am trying to do this
Ignore above comment, I am trying to make the players walkspeed doublefor 5 seconds, meanwhile, a bar goes down and then the players walkspeed is back to 16
Try adjusting your function to use the ContextActionService. The current method you're using isn't recommended and might cause issues.
its works fully in testing mode though, and nothing is wrong with it until i use it in-game
also, I forgot to mention but my remoteevent is inside serverscriptservice
also, I forgot to mention but my remoteevent is inside serverscriptservice
It most likely doesn't work because you're trying to access your remote event from a localscript. Your event is in ServerScriptService, which is not replicated on the client and therefore the client has no access to it.
where do I place it then? replicated storage?
That's where I put mine, yeah.