I'm making a magic ability, but I need to activate a local script from a server script for it to work. I tried using :FireClient() but that didn't work.
I also tried using _G. but that didn't work either. Does anybody know a way?
Edit: Heres my code:
The portal script
_G.Portal = false
local rp = game:GetService("ReplicatedStorage") local TweenService = game:GetService("TweenService")
local Meshes = rp.VoidBeam:WaitForChild("Meshes") local Animations = rp.VoidBeam:WaitForChild("Animations") local Remotes = rp.VoidBeam:WaitForChild("Remotes")
Remotes.Void.OnServerEvent:Connect(function(player)
rp.Show:FireClient()
local Character = player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local Humrp = Character:WaitForChild("HumanoidRootPart")
local EcksDee = Humanoid:LoadAnimation(Animations.EcksDee)
EcksDee:Play()
local Portal = Meshes:WaitForChild("Portal"):Clone()
Portal.CFrame = Humrp.CFrame * CFrame.new(0,10,-75)
Portal.Orientation = Portal.Orientation + Vector3.new(0,180,0)
Portal.Parent = workspace
local Position = Portal.Position
local b = Instance.new("BodyPosition")
b.position = Position
b.maxForce = Vector3.new(500000000, 500000000, 500000000)
b.Parent = Character.UpperTorso
wait(0.95)
Humrp.Position = Vector3.new(100,30000,100)
Humrp.Anchored = true
_G.Portal = true
b.Parent = nil
end)
The show gui script
game.ReplicatedStorage.Show.OnClientEvent:Connect(function()
if _G.Portal == true then
script.Parent.Visible = true
end
end)

6 comments
Could you please include a script?
Well I got no errors and I looked at stuff and the script is fine.
Include a script so we can know what the problem is
did you include onfireclient in the local script
Do you mean, OnClientEvent:Connect(function(), cause I did that
I'm getting an error, it says "Argument 1 missing or nil"