Yeniay38
(Enil)
August 18, 2023, 1:43pm
#1
Hello, i tried to make a atmosphere change script that works on client-side (has remote event) but its not working, there isnt any error at output
local script
local RemoteEvent = game.ReplicatedStorage.Atmosphere.SoulAtmosphere
RemoteEvent.OnClientEvent:Connect(function()
local Lighting = game.Lighting
local Atmosphere = Lighting.Atmosphere
Atmosphere.Density = 0.6
Atmosphere.Offset = 0
Atmosphere.Color = Color3.new(8, 144, 207)
Atmosphere.Decay = Color3.new(0, 143, 138)
Atmosphere.Glare = 0.3
Atmosphere.Haze = 3
end)
legacy script
local RemoteEvent = game.ReplicatedStorage.Atmosphere.SoulAtmosphere
local debounce = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and debounce == false then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
RemoteEvent:FireClient(plr)
debounce = true
end
end)
Can you help me
1 Like
Where is the client script at?
1 Like
Yeniay38
(Enil)
August 18, 2023, 1:44pm
#3
Its at replicated storage in the remote event
1 Like
Client scripts dont work there
1 Like
Yeniay38
(Enil)
August 18, 2023, 1:45pm
#5
oh then thats why its not working i will change it’s position and try again thank u
Yeniay38
(Enil)
August 18, 2023, 1:48pm
#6
I changed it’s position to workspace but still its not working
Where did u put the local script?
2 Likes
Yeniay38
(Enil)
August 18, 2023, 1:51pm
#8
i put it to the workspace directly
Local scripts only work in starter
so put it in starterplayerscripts or startercharacterscripts or startergui
2 Likes
Yeniay38
(Enil)
August 18, 2023, 1:52pm
#10
O yeah youre right, thank you for the help. its now working
1 Like
system
(system)
Closed
September 1, 2023, 1:53pm
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.