Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

in my game is fe and unanhor problem ????????? [closed]

Asked by
gessettw -31
5 years ago

in my game main thing to do is cuting tree when player cut tree automatic unanhor but if i enable filtering trees won't unanhor why ? i need help filtering enabled is important

0
Any more details? The script source? Is it a localscript or a server script? Amiaa16 3227 — 5y
0
Make sure you're unachoring the tree from a regular script and not a local script. Troidit 253 — 5y
0
it is normal script in workspace gessettw -31 — 5y
0
At least post the source Amiaa16 3227 — 5y
View all comments (7 more)
0
what source gessettw -31 — 5y
0
script ? gessettw -31 — 5y
0
Yes, could you paste your code so we can see it? Troidit 253 — 5y
0
tree script ? gessettw -31 — 5y
0
hits = script.Parent.Hits b=script.Parent:clone() qwerty=false function OnChange() if qwerty==false then if hits.Value<=0 then hits.Value=0 qwerty=true c=script.Parent:GetChildren() for i=1, #c do if c[i].Name=="Tree" then c[i].Anchored=false local number = math.random(1, 2) if number == 1 then c[i].Velocity = c[i].CFrame.lookVector * math.random(-20, -10) end if number == 2 then c[i].Velocity = c gessettw -31 — 5y
0
please help gessettw -31 — 5y
0
... Amiaa16 3227 — 5y

Closed as Not Constructive by RubenKan

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 5 years ago

Since You game is Filtering Enabled you should use Remote Events to make it unanchor. I am guessing you are using a local script from the tool/whatever it is to cut the tree down. What I would do is

Local Script

local Event = Where you want it located

--When you cut it down use --
Event:FireServer()
--To fire the server and it will go to a server script--

Server Script

local Event = Where you want it located

Event.OnServerEvent:Connect(function() --Or you can just have it do a function--
    --script to cut down trees--
end

The reason you use remote events is because with Filtering Enabled the client has no access to the server. So it is unable to make changes unless you use remote events which can be used to make changes from the client. Anchoring will not be seen from a server script so what you should do is use the Event to send it to the server script which will be on the server side and will be able to make the changes so all players are able to see it.

Since you didnt explain enought it may not be the correct answer but this is the closest I was able to get to your explaination. Sorry if it isn't enough. Next time post your script so we are able to know how it would work.

Ad