Im having trouble with a shaking mechanic for an entity for my game. When the entity gets closer to you, your screen shakes more, you get the idea. But the thing is I want it to be located inside of the Moving script, a normal Script. However, from what I’ve heard, they can only be ran in services that have “Starter” in it. Any solutions? (I will be using a module for the shaky stuff then require in the localscript.)
Insert a normal script, change the context to “Client” in its properties. That can be ran anywhere on the client, but not in ServerStorage or ServerScriptService
camera stuff can’t be modified in server scripts, you need to use localscripts to modify camera properties
If you insert a normal script and change it’s context to client, you can do it
bro, Did you hear me!!
if you use a normal script and set its context property to Client you can use it anywhere but whatever i said
firstly no need to be so aggressive
secondly i’ve had issues with runcontext modified scripts causing warnings on the server and it’s generally way more convenient to just use localscripts as they will never run on the server
Why not just have a localscript in PlayerScripts that references all the monsters in the game?
for context heres the local script (if it looks like i got this from an exploit i got it from a free model cuz i got lazy to make one myself)
local v3 = game:GetService("RunService")
local v9 = workspace.CurrentCamera
local v35 = script.Dist.Value
local v39 = game:GetService("Players").LocalPlayer
local v40 = v39.Character
local v14
if not v40 then
v40 = v39.CharacterAdded
v14 = v40:Wait()
end
local v18 = script
local v19 = v18.Part
while true do
v18 = game["Run Service"]
v19 = v18.Heartbeat
local v22 = v19:Wait()
if v22 then
break
end
local v24 = v19.Value.Position
v18 = v14:WaitForChild("HumanoidRootPart").Position - v24.Magnitude
v22 = math.clamp
local v28 = 1 - (v22(v18, 0, v35)) / v35
if v28 >= 0 then
v24 = game.Workspace.CurrentCamera;
(require(game.ReplicatedStorage.ShakyModule))(v24, (v28) * script.Strength.Value, 60, 0.7, "normal")
end
end
what the hell are these variables
i said i got it from a free model so ask the owner of the free model what it is
im sorry but atleast change them to something readable
i mean i can try but it probably still wont look good
ok i cant do it its too confusing
i wouldnt use this script i dont even understand it while keep track of variables
that’s a decompiled script, you can’t get variable names from decompiling a script so they just look like this
yeah also i figured out how to fix it so yeah
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.