Script not showing to everyone

So this is a part of a script, so when the animation plays and it ends it should make the player transparency to reappear (back to 0) it’s doing that but only shown to the serverside(view) but when on another player it doesn’t show for him that his back to being transparency of 0 but instead his still transparent now why is that? it’s in a serverscript shouldn’t it show for all?
Script:

-- !strict

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ResSpell = ReplicatedStorage.WitchesEvents.RessurectionSpell
local TweenService = game:GetService("TweenService")
ResSpell.OnServerEvent:Connect(function(plr, TargetName)
	print("received")
	local Animationplayer = script.Animation
	local Animationplayertrack = plr.Character.Humanoid.Animator:LoadAnimation(Animationplayer)
	local PlayerHrp = plr.Character:WaitForChild("HumanoidRootPart")
	local TargetCorpse = game.Workspace.Corpses[TargetName.Name]
	local CorpseHrp = TargetCorpse.UpperTorso
	local MagnitudeBetweenTargets = (PlayerHrp.Position - CorpseHrp.Position).Magnitude
	if MagnitudeBetweenTargets <= 7 then
		local Sound = script.Sound:Clone()
		Sound.Parent = PlayerHrp
		Sound:Play()
		Sound.Looped = true
		Animationplayertrack:Play()
		wait(7.05)
		Sound:Destroy()
		local HrpTarget = TargetName.Character.HumanoidRootPart
		HrpTarget.CFrame = CFrame.new(CorpseHrp.Position)
		wait(.5)
		HrpTarget.Anchored = true
		for i, v in pairs(TargetName:GetDescendants()) do
			if v:IsA("BasePart") or v:IsA("Decal") then
				if v.Name ~= HrpTarget.Name then
					TweenService:Create(v, TweenInfo.new(.5), {Transparency = 0}):Play()
				end
			end
		end
		for i, v2 in pairs(TargetCorpse:GetDescendants()) do
			if v2:IsA("BasePart") then
				TweenService:Create(v2, TweenInfo.new(.5), {Transparency = 1}):Play()
			end
		end
		ResSpell:FireClient(TargetName)
		TargetCorpse:Destroy()
	end
end)

what is TargetName? what does the ResSpell:FireClient(TargetName) do?

Target name is the player that was called (playercalled)

-- !strict
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local Uis = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ResSpell = ReplicatedStorage.WitchesEvents.RessurectionSpell
local Cd = false

Player.Chatted:Connect(function(msg)
	local Spell = msg:lower()
	for i, v in pairs(game:GetService("Players"):GetChildren()) do
		if Spell == "phasmatos raveras on animum "..v.Name:lower() then
			if not Cd then
				print("Sent")
				ResSpell:FireServer(v)
				Cd = true
				wait(30)
				Cd = false
			end
		end
	end
end)

and for th fireclient(targetname) im just firing back to the client to have his lightning back to normal

-- !strict
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ResSpell = ReplicatedStorage.WitchesEvents.RessurectionSpell


ResSpell.OnClientEvent:Connect(function()
	local Lightning = game:GetService("Lighting")
	Lightning.ColorShift_Bottom = Color3.fromRGB(0, 0, 0)
	Lightning.ColorShift_Top = Color3.fromRGB(0, 0, 0)
	Lightning.OutdoorAmbient = Color3.fromRGB(70, 70, 70)
	Lightning.ClockTime = 16.9
	Lightning.Atmosphere.Density = 0.3
	Lightning.Atmosphere.Offset = 0.25
	Lightning.Atmosphere.Color = Color3.fromRGB(199, 199, 199)
	Lightning.Atmosphere.Decay = Color3.fromRGB(106, 112, 125)
	Lightning.Atmosphere.Haze = 0
	Char.HumanoidRootPart.Anchored = false
end)

so say the event is fired on plr1, and that makes the ball dissapear on plr1 and on the server. but not for plr2?

I mean i feel like your onto something but im trying idk fireserver doesn’t get affected by what’s in the parameters so idk why would that be an error if you could give a demonstration on my code or something prob would make me understand better

so if you inputted something other than a Player object as the TargetName, it wouldn’t get “affected”?

what are you trying to do? make the TargetName fade away??

1 Like

I found the problem it’s because i change the transparency on client side so i had to change it again on client side not on serverside so yeah thank you tho

1 Like