basically whenever i use fireclient() it doesn’t do anything but if i use fireallclient() it works fine and idk why also I cloned these parts and set their parent to workspace.VFX which is just a folder i made inside of workspace but after i delete the parts it says their parent property is locked
i have a localscript that has a remote event inside of it for the fireclient thing, the script is in startplayerscripts
NOTE: im not that good a coding so ya
my code is:
"local rs = game:GetService(“ReplicatedStorage”)
local ts = game:GetService(“TweenService”)
local Debris = game:GetService(“Debris”)
local DomainModule = require(rs.Modules.Domains.DomainModule)
local CameraShaker = require(rs.Modules.CameraShaker)
local info = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local remoteEvent = rs.Remotes.DomainExpansion.RemoteEvent
local FOVEvent = rs.Remotes.DomainExpansion.FOVChanger
local CameraShake = rs.Remotes.CameraShake
local main = Instance.new(“Part”)
main.Size = Vector3.new(1, 0.5, 1)
main.Anchored = true
main.CanCollide = false
main.CanTouch = true
main.Transparency = 0.35
main.Name = “DETpPart”
–// SETTINGS
local domainTime = 30
–// VFX
local domainSphere = rs.VFX.Domain.DomainPart:Clone()
local Lines = rs.VFX.Domain.Lines1:Clone()
–// FUNCTIONS
local function applyUIEffects(player)
local gui = player.PlayerGui:FindFirstChild(“DomainGui”)
if gui then
local frame = player.PlayerGui:WaitForChild(“DomainGui”).ScreenGui.Frame
local text = player.PlayerGui:WaitForChild(“DomainGui”).ScreenGui.DomainText
if frame and text then
end
local startPos = UDim2.new(0, 0, 0.5, 0)
local startSize = UDim2.new(0, 0, 1, 0)
local endSize = UDim2.new(1, 0, 1, 0)
local endPos = UDim2.new(0.5 ,0 , 0.5, 0)
local uiTime = 1
local otherTime = 1.5
frame.Position = startPos
frame.Size = startSize
frame.Visible = true
frame:TweenSizeAndPosition(endSize, endPos, Enum.EasingDirection.Out, Enum.EasingStyle.Sine, uiTime)
task.wait(1)
DomainModule:Transparent(text, UDim2.new(0, 674, 0, 297), 1, 5)
wait(otherTime)
frame:TweenSizeAndPosition(startSize, startPos, Enum.EasingDirection.Out, Enum.EasingStyle.Sine, uiTime)
wait(1)
frame.Visible = false
end
end
local function teleportPlayer(player, destination)
local character = player.Character
if character and character:FindFirstChild(“HumanoidRootPart”) then
character:PivotTo(destination)
end
end
–// EVENT
remoteEvent.OnServerEvent:Connect(function(player: Player)
local character = player.Character or player.CharacterAdded:Wait()
local hum = character:WaitForChild(“HumanoidRootPart”)
local track = Instance.new("Animation")
track.AnimationId = "rbxassetid://107942546491930"
local anim = character.Humanoid:LoadAnimation(track)
anim:Play()
local normalFov = 70
local fovTime = 0.5
local fov = 50
FOVEvent:FireClient(fov, fovTime, 6, normalFov)
local walkSpeed = character.Humanoid.WalkSpeed
local jumpHeight = character.Humanoid.JumpHeight
character.Humanoid.WalkSpeed = 0
character.Humanoid.JumpHeight = 0
anim:GetMarkerReachedSignal("Hit"):Connect(function()
print("Keyframe has been reached")
--// FX
local transformEffect = rs.VFX.Domain.Transform
local transformEffectPos = hum.CFrame - Vector3.new(0,0.5,0)
DomainModule.EmitEffect(transformEffect, transformEffectPos, 2)
--// The rest
local clone = main:Clone()
local humPos = hum.CFrame
clone.CFrame = humPos - Vector3.new(0, 3, 0)
clone.Parent = workspace.VFX
ts:Create(clone, info, { Size = Vector3.new(50, 0.5, 50) }):Play()
task.wait(3)
character.Humanoid.WalkSpeed = walkSpeed
character.Humanoid.JumpHeight = jumpHeight
local floor = Instance.new("Part")
floor.Anchored = true
floor.Size = Vector3.new(230, 1, 230)
floor.CanCollide = true
floor.Transparency = 1
floor.Name = "DomainFloor"
local Fclone = floor:Clone()
Fclone.CFrame = CFrame.new(0, -500, 0)
Fclone.Parent = workspace.VFX
Lines.Parent = game.Workspace.VFX
Lines.CFrame = Fclone.CFrame * CFrame.new(-110,0,0)
domainSphere.CFrame = Fclone.CFrame
domainSphere.Parent = game.workspace.VFX
local originalPositions = {}
originalPositions[player] = hum.CFrame
hum.Anchored = true
anim:Stop()
teleportPlayer(player, Fclone.CFrame - Vector3.new(0, -7, 0))
hum.Anchored = false
applyUIEffects(player)
clone.Touched:Connect(function(hit)
local otherPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)
if otherPlayer and not originalPositions[otherPlayer] then
local otherCharacter = otherPlayer.Character
if otherCharacter and otherCharacter:FindFirstChild("HumanoidRootPart") then
originalPositions[otherPlayer] = otherCharacter:WaitForChild("HumanoidRootPart").CFrame
otherCharacter:WaitForChild("HumanoidRootPart").Anchored = true
teleportPlayer(otherPlayer, Fclone.CFrame - Vector3.new(0, -7, 0))
applyUIEffects(otherPlayer)
otherCharacter:WaitForChild("HumanoidRootPart").Anchored = false
end
end
end)
FOVEvent:FireClient(120, 1.5, 4, 70)
clone:Destroy()
task.wait(domainTime)
for plr, pos in pairs(originalPositions) do
teleportPlayer(plr, pos)
end
Lines:Destroy()
domainSphere:Destroy()
Fclone:Destroy()
end)
end)