Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This Script Is Only Running Server Sided?

the title says it all idk if roblox changed lighting being able to be altered client side only or what but heres the script Script:

local l = game.Lighting

script.Parent.Touched:Connect(function(hit)

if game.Players:findFirstChild(hit.Parent.Name) then

local player = game.Players:GetPlayerFromCharacter(hit.Parent)

print("running")

l.Brightness = .1

l.Ambient = Color3.new(84/255, 15/255, 83/255)

l.OutdoorAmbient = Color3.new(186/255, 87/255, 206/255)

l.FogEnd = 550

l.FogStart = 100

l.FogColor = Color3.new(104/255, 30/255, 103/255)

l.ExposureCompensation = .43

print("ran")

end

end)

1 answer

Due to Filtering Enabled, unless you're altering your Character. Everything done Client Side will not replicate to the server.

So the code in your post, if that is indeed Client Side it'll only change for the Client.

You can get around this by firing to the Server using a Remote Event and then running the code you provided on the Server.

2 comments

0

no i want it to work only on the client but it doesnt but if i convert it to a serverscript it works fine

0

Well what's the error?

This discussion is preserved as it was. New answers, comments, and votes are closed.