What do you want to achieve? Yo, so i was trying to make a simple script for some particles but im really, really new to this and i dont know how to replace one simple thing so I came here to ask for help.
What is the issue? I don’t know how to replace the REPLACETHISPART with the text that a user has put in the textbox
What solutions have you tried so far? I tried to set the REPLACETHISPART with TextBox.Text but that didn’t work… also tried to replace it with People.Character but that also didn’t work…
Well as far as I’m aware, only Player objects are replicated across the server-client boundary in the Players folder.
You should never use the Players service as a means of storing objects, as I said use ReplicatedStorage and then if their is still an issue post your code.
I know it may be dumb to use but i still want to use this
i tried to do this:
execute.MouseButton1Down:Connect(function()
Target = nameinput.Text
if Target == "andrejkooooo" then
workspace.resources.events.snowSplat:FireServer(game.Players.andrejkooooo)
else
People = game:GetService("Players"):FindFirstChild(Target)
if not People or not People.Character then
return
end
workspace.resources.events.snowSplat:FireServer(game.Players.People)
end
end
end)
or could i somehow replace it with some other line of code?
You can’t pass objects across the server-client boundary The server can already see this so you don’t need to worry about passing it over unless the object was made locally.
For reference this is the object: game.Players.People
k, i had a similliar post to this but never got a straight answer as how to replace something in the script with TextBox.Text so once again i’m asking if someone knows how to do this thing
Well to do that, you have to make sure you’ve created a pathway. Essentially, you have to pretend the script is very dumb and point to the object for it to work.
So firstly, move the resources alongside your libraries folder to ReplicatedStorage. This is just because objects like that don’t need to be handled into the workspace (as the workspace does have additional properties and behaviours).
To point to snowSplat you would then simply do:
local myEvent = game.ReplicatedStorage.resources.events.snowSplat
Well you would have to do that through the server, by either firing an event to the specific client, and then whatever script is listening can then proceed to handle / act.
You should experiment yourself however, not let me give you the entire solutions.