Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

can one remoteEvent be used to create instances and at the same time be used to change properties?

if so, what would be the best way to carry this out? Im thinking of it carrying a reason for call value, and from that it would decide whether it should do what.

2 comments

0

yes

0

ok

1 answer

Server Script:

local Remote = game:GetService("ReplicatedStorage").RemoteEvent

Remote.OnServerEvent:Connect(function(player,key,obj,Property,Value)
	if key == "ChangeProperties" then
		obj[Property]= Value
	elseif key == "Create" then
		local ob = Instance.new(obj)
		ob.Name = "CreatedObject"
		ob.Parent = workspace
	end
end)

local Script:

local Remote = game.ReplicatedStorage.RemoteEvent
-- Create a "Part"
Remote:FireServer("Create","Part","None","None")
--Change parts property
Remote:FireServer("ChangeProperties",workspace.Part,"Transparency",0.5)

Try that idk if that will work or not

3 comments

0

im afraid not

0

for starters, line 05 wont work

0

although u could just define property as object.Property i think

This discussion is preserved as it was. New answers, comments, and votes are closed.