#I am desperate (HELP ME WITH LOCAL PARTS!!!)
82 messages · Page 1 of 1 (latest)
imma try doing the script
yes!
thank u so much!
is this what u meant ```lua
local part = nil --replace nil with the part path
local baseplate = nil --replace nil with the baseplate path
part.Touched:Connect(function(hit)
local players_data = nil --replace nil with the path of player data
local bool = players_data.Boolean
bool = true
bool:GetPropertyChangedSignal("Value"):Connect(function()
if bool.Value == true then
part.CanCollied = true
end
end)
bool:GetPropertyChangedSignal("Value"):Connect(function()
part.CanCollied = false
end)
end)
hit is the player
that touched the part
thank u so much
local part = nil --replace nil with the part path
local baseplate = nil --replace nil with the baseplate path
part.Touched:Connect(function(hit)
local character = hit.Parent
if not character:IsA("Model") then
return
end
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then
return
end
local player = game.Players:GetPlayerFromCharacter(character)
if not player then
return
end
local players_data = nil --replace nil with the path of player data
local bool = players_data.Boolean
bool = true
bool:GetPropertyChangedSignal("Value"):Connect(function()
if bool.Value == true then
part.CanCollied = true
end
end)
bool:GetPropertyChangedSignal("Value"):Connect(function()
part.CanCollied = false
end)
end)
i got u the character humanoid and player
** You are now Level 2! **
A few typos
:((
And also he wanted the part to be changed locally. I think
this doesnt change it locally?
** You are now Level 2! **
That is server side i think
ohhh
so the part is local but the base plate isnt
gotcha
the part in here should be local
yes
yes
try moving the local part = --path to part
inside the function p.touched
tell me the path
so ill make it for you
is it located inside the player?
game.Workspace.Lvl2
Local parts the server cannot see
If you try to change it, it will return nil and therefor error
alright
so i have this part in serverstorage that i copy in game.Workspace.Lvl2 (i do this trough a script)
If you destroy the baseplate in the local script no one other than the client can see it
So it is a server wide one
Cuz server storage is only accesible by server
That might do the trick
local PartLvl2 = game.Lighting.Lvl2
local Baseplate0 = PartLvl2.Baseplate0:Clone()
Baseplate0.Parent = game.Workspace.Lvl2
You seem pretty skilled @viral delta
this is the script i put in startergui
lol
i saved it in lightingn
dont put instances in lighting
i dont know someone on yt told me so
it works but its weirdddd
Other than instances needed to be in lighting
Use replicated storage or server storage
bc it didnt work when i put it in server storage
Cuz it is a local script
Use replicated storsge
Since it will be replicated for both server and client
ill do it
so ur trying the progress?
yes
i want it to work with a viriable in the player so that if the player changes part i can reset the local part easly
does the script work?
does the script work?
i tried but it doesnt work
** You are now Level 3! **
i think it's because that part is local
and i cant interact with that local part with a "universal" script
if u put the script i gave u in a local script it will get only the local part
