#dude how is playerscripts not valid member of the player????

1 messages · Page 1 of 1 (latest)

ornate birch
#
local module = {}

local soundservice = game:GetService("SoundService")
local Players = game:GetService("Players")
local lighting = game:GetService("Lighting")
function module.Trigger()
    for _, player in Players:GetPlayers() do
        player.PlayerGui.BlackScreen.Frame.Visible = true
        wait(0.45)
        player.PlayerGui.BlackScreen.Frame.Visible = false
    end
    lighting.RED.Enabled = true
    lighting.CREEPY.Enabled = true
    soundservice.scare_Loud_noise.Playing = true
    for _, player in Players:GetPlayers() do
        local screenshake = player.PlayerScripts.scare_screenshake
        local INTENSITY = screenshake.INTENSITY.Value
        INTENSITY = 200
        screenshake.Enabled = true
    end
end

return module
#

it is INSIDE there

formal mica
ornate birch
#

okay lemme try

formal mica
#

wait is this server or client

#

playerscripts doesnt exist on server

ornate birch
#

it enables every player's screenshake
client script

#

no i meant

#

screenshake

#

not screenshare

formal mica
#

regardless, playerscripts doesnt replicate on the server. You'd need to use remote event to trigger all player's screenshake

ornate birch
#

wait why didnt it edit the INTENSITY value?

#

i set to this but still not changing the value

#

intensity is a numbervalue inside the screenshake script

#

and screenshake script uses intensity value for shaking the camera

formal mica
#

is the value a static variable inside the screenshake script

ornate birch
#

no

formal mica
ornate birch
#

in PlayerScripts

#

not the server tho

#

i mean

#

not the StarterPlayerScripts tho

formal mica
ornate birch
#

the script itself is in workspace

formal mica
#

goddamn, is the script on server side or client side

ornate birch
#

how do i know? the script is module one

formal mica
#

module is required by a script

#

what script is requiring that module

ornate birch
#

the event manager inside serverscriptstorage

formal mica
#

Great, just like what i said before.

#

playerscripts doesnt replicate on the server. You'd need to use remote event to trigger all player's screenshake

ornate birch
#

btw the black screen did show up on my screen

formal mica
#

because your server script is editing it

ornate birch
#

maybe waitforchild is waiting too long to find the playerscripts

#

lemme use findfirst chil

formal mica
#

do you even understand

#

what i said

ornate birch
#

ok it did find the playerscript but heres another error

#

ill use findfirstchild on scare_screenshake

#

wait what

#

okay lemme just leave scare_screenshake enabled then change the INTENSITY value only

#

okay you know what, ill put the INTENSITY value into the workspace then let screenshake use it

#

and ill use module script to change the intensity value