Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I have latency with Remote Events even in Studio?

Asked by
Blob_y 2
5 years ago
Edited 5 years ago

Here's the scripts I'm using..

``` local RepStor = game:GetService("ReplicatedStorage")

local PinkFloor = RepStor:WaitForChild("PinkFloor")

PinkFloor.OnServerEvent:Connect(function(Player)

local Character = Player.Character

local Floater = Instance.new("Part")

Floater.Anchored = true

Floater.Parent = game.Workspace

Floater.Size = Vector3.new(4,0.5,4)

game.Workspace.SoundFolder.MagicEffectA:Play()

Floater.Transparency = 0.4

Floater.BrickColor = BrickColor.new("Pastel orange")

Floater.TopSurface = "Smooth"

Floater.BottomSurface = "Smooth"

Floater.CFrame = Character.Torso.CFrame * CFrame.new(0,-3.5,0)

wait (2)

for i = 1,6 do

Floater.Transparency = Floater.Transparency+0.1

wait()

end

wait(0.1)

Floater:Destroy()

end) ``` And to call it

``` local _plr = game:GetService("Players").LocalPlayer

local _mouse = _plr:GetMouse()

local function HasPower(powerName)

if (_plr.Powers[powerName].Value) then

return true

else

return false

end

return false

end

local Stop = true

_mouse.KeyDown:Connect(function(_key)

if (_key == "e" and HasPower("SuperPower")) then

game.ReplicatedStorage.PinkFloor:FireServer()

end

end) ```

This is in studio https://media.giphy.com/media/EPIT0gqyY67h3dDBQJ/giphy.gif

And this is in Client https://media.giphy.com/media/JRJYNe3k3vgQlV152T/giphy.gif

This is without a Remote Event https://media.giphy.com/media/zICqGj9FH0jkmd0fCS/giphy.gif

Answer this question